Skip to content

mlog: Respect preexisting $LESS for pager - #16137

Open
meator wants to merge 1 commit into
mesonbuild:masterfrom
meator:pr/fix-less-pager-env
Open

mlog: Respect preexisting $LESS for pager#16137
meator wants to merge 1 commit into
mesonbuild:masterfrom
meator:pr/fix-less-pager-env

Conversation

@meator

@meator meator commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

I grew tired of seeing the following every time I wanted to check options with meson configure:

image

I have LESS set to --ignore-case, which also coicidentally disabled Meson's -R.

Paged output was garbled if default less pager was used and $LESS was
already set in the environment.
@meator
meator requested a review from jpakkane as a code owner August 23, 2026 14:54
@bonzini

bonzini commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Meson's current behavior is, at least, consistent with Git. From git-config(1):

When the LESS environment variable is unset, Git sets it to FRX (if LESS environment variable is set, Git does not change it at all).

@meator

meator commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

I just checked and it's broken on git too. I usually use a custom pager for git, so I did not notice.

TBH I don't agree with git. I just want to set --ignore-case, is that a good enough reason for meson and git to produce garbled output? I don't want to set the other stuff permanently too. And I think this solution is better than having to change global LESS or having to add an alias or custom function to override LESS for that one command.

I'll undetstand if meson wishes to keep following git behavior.

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.

2 participants