Skip to content

show-config: surface $LESSOPEN, $LESS, $PAGER - #2219

Open
albatrossflyon-coder wants to merge 1 commit into
dandavison:mainfrom
albatrossflyon-coder:fix/show-config-lessopen-env
Open

show-config: surface $LESSOPEN, $LESS, $PAGER#2219
albatrossflyon-coder wants to merge 1 commit into
dandavison:mainfrom
albatrossflyon-coder:fix/show-config-lessopen-env

Conversation

@albatrossflyon-coder

Copy link
Copy Markdown
Contributor

Summary

  • Follow-up to 🐛 delta emits ANSI reset on empty stdin, producing a phantom blank line #2151, where $LESSOPEN silently caused a phantom ANSI reset on empty stdin — real effort to track down since it's invisible in delta's own config output
  • Adds $LESSOPEN, $LESS, and $PAGER to --show-config's output, as suggested by @HaleTom in that issue, so a similar problem is faster to diagnose next time
  • Shows unset when the variable isn't set, matching the surrounding style

Test plan

  • cargo test show_config — both tests pass, including a new one asserting the three env-var lines appear
  • cargo test — full suite passes (416 passed, 0 failed)
  • Manually verified --show-config output: shows unset for all three by default, and the real value (e.g. $LESSOPEN) when actually set in the environment

These env vars can silently interfere with delta's output (see dandavison#2151,
where $LESSOPEN caused a phantom ANSI reset on empty stdin that took
real effort to track down) but were invisible in --show-config. Now
surfaced alongside delta's own options so a similar issue is faster
to diagnose.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant