-
-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PAGER option --use-color not supported in all regions #2335
Comments
Thanks for the investigation and report. Yes I'm extremely surprised to hear that. Are you sure you're not using some variant or older version of the official
from |
Here you go. It's older because these systems are both 20.04. No unusual
variants :-)
```$ less --version
less 551 (GNU regular expressions)
Copyright (C) 1984-2019 Mark Nudelman
less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Home page: http://www.greenwoodsoftware.com/less
$ less --use-color /etc/issue
There is no use-color option ("less --help" for help)
```
…---------- Forwarded message ---------
From: Simon Michael ***@***.***>
Date: Wed, 26 Feb 2025, 22:01
Subject: Re: [simonmichael/hledger] PAGER option --use-color not supported
in all regions (Issue #2335)
To: simonmichael/hledger ***@***.***>
Cc: p-phillips ***@***.***>, Author ***@***.***>
Thanks for the investigation and report. Yes I'm extremely surprised to
hear that. Are you sure you're not using some variant of the official less
My less --version is
$ less --help | less --use-colour
There is no use-colour option ("less --help" for help)
Press RETURN to continue
~/src/hledger$ less --version
less 668 (PCRE2 regular expressions)
Copyright (C) 1984-2024 Mark Nudelman
less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Home page: https://greenwoodsoftware.com/less
from /opt/homebrew/bin/less.
—
Reply to this email directly, view it on GitHub
<#2335 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMINTVZXKIWEEHGWCLR55T2RY2U5AVCNFSM6AAAAABX23P2EWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBWGMYDIMRQGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
[image: simonmichael]*simonmichael* left a comment
(simonmichael/hledger#2335)
<#2335 (comment)>
Thanks for the investigation and report. Yes I'm extremely surprised to
hear that. Are you sure you're not using some variant of the official less
My less --version is
$ less --help | less --use-colour
There is no use-colour option ("less --help" for help)
Press RETURN to continue
~/src/hledger$ less --version
less 668 (PCRE2 regular expressions)
Copyright (C) 1984-2024 Mark Nudelman
less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Home page: https://greenwoodsoftware.com/less
from /opt/homebrew/bin/less.
—
Reply to this email directly, view it on GitHub
<#2335 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMINTVZXKIWEEHGWCLR55T2RY2U5AVCNFSM6AAAAABX23P2EWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBWGMYDIMRQGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I just pulled down the source code for each of those versions, no "colour"
in the code!
Is it possible that there's a GNU library doing something smart to match
the local region?
Pete
…On Wed, 26 Feb 2025, 22:38 Pete Phillips, ***@***.***> wrote:
Here you go. It's older because these systems are both 20.04. No unusual
variants :-)
$ less --version
less 551 (GNU regular expressions)
Copyright (C) 1984-2019 Mark Nudelman
less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Home page: http://www.greenwoodsoftware.com/less
$ less --use-color /etc/issue
There is no use-color option ("less --help" for help)
---------- Forwarded message ---------
From: Simon Michael ***@***.***>
Date: Wed, 26 Feb 2025, 22:01
Subject: Re: [simonmichael/hledger] PAGER option --use-color not supported
in all regions (Issue #2335)
To: simonmichael/hledger ***@***.***>
Cc: p-phillips ***@***.***>, Author ***@***.***>
Thanks for the investigation and report. Yes I'm extremely surprised to
hear that. Are you sure you're not using some variant of the official less
My less --version is
$ less --help | less --use-colour
There is no use-colour option ("less --help" for help)
Press RETURN to continue
~/src/hledger$ less --version
less 668 (PCRE2 regular expressions)
Copyright (C) 1984-2024 Mark Nudelman
less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Home page: https://greenwoodsoftware.com/less
from /opt/homebrew/bin/less.
—
Reply to this email directly, view it on GitHub
<#2335 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMINTVZXKIWEEHGWCLR55T2RY2U5AVCNFSM6AAAAABX23P2EWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBWGMYDIMRQGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
[image: simonmichael]*simonmichael* left a comment
(simonmichael/hledger#2335)
<#2335 (comment)>
Thanks for the investigation and report. Yes I'm extremely surprised to
hear that. Are you sure you're not using some variant of the official less
My less --version is
$ less --help | less --use-colour
There is no use-colour option ("less --help" for help)
Press RETURN to continue
~/src/hledger$ less --version
less 668 (PCRE2 regular expressions)
Copyright (C) 1984-2024 Mark Nudelman
less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Home page: https://greenwoodsoftware.com/less
from /opt/homebrew/bin/less.
—
Reply to this email directly, view it on GitHub
<#2335 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMINTVZXKIWEEHGWCLR55T2RY2U5AVCNFSM6AAAAABX23P2EWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBWGMYDIMRQGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Quite a mystery. Could a shell function or alias be getting in the way ? I did
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've just had to start using hledger on a different machine than usual (Ubuntu 20.04) due to the death of my Ubuntu 24.04 laptop, and I noticed that commands I'm running from a Makefile were halting due to a problem with the PAGER command line options.
Specifically I was getting this error message:
There is no use-color option ("less --help" for help)
It took me a while to track this down (grepping all of my zsh config files etc) but it turns out it's because of the default pager options that hledger turns on - as the man page says:
(At the time of writing: --chop-long-lines --hilite-unread --ignore-case --mouse --no-init --quit-at-eof --quit-if-one-screen --RAW-CONTROL-CHARS --shift=8 --squeeze-blank-lines --use-backslash --use-color ). If these don't work well, you can set your preferred options in the HLEDGER_LESS variable, which will be used instead.
It appears that less is region specific - i.e., I'm in Wales in the UK, and we spell 'colour' (not 'color') so less accepts '--use-colour' but not '--use-color'!!!! (I'm as surprised about this as you probably are).
I've fixed it on my machine by setting HLEDGER_LESS to include '--use-colour':
export HLEDGER_LESS="--chop-long-lines --hilite-unread --ignore-case --mouse --no-init --quit-at-eof --quit-if-one-screen --RAW-CONTROL-CHARS --shift=8 --squeeze-blank-lines --use-backslash --use-colour"
However there must be other non-USA folks bitten by the same issue. Is there a simple fix for this ? Can the code be amended to set a region-specific flag and use colour instead of color ? Or is there another way around this?
Pete
PS: The switch of machines meant I was sending the output to a screen - I usually send them through a pipe to a printer and in that case the pager doesn't kick in of course - so I don't think it's the different versions of OS that triggers this.
The text was updated successfully, but these errors were encountered: