Skip to content
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

8-bit color strings break in a lesskey file. #3

Open
christian-oudard opened this issue Sep 18, 2022 · 0 comments
Open

8-bit color strings break in a lesskey file. #3

christian-oudard opened this issue Sep 18, 2022 · 0 comments

Comments

@christian-oudard
Copy link

christian-oudard commented Sep 18, 2022

Using Less version 608.

This lesskey file breaks:

#env
LESS = -R --use-color --color=d+1 --color=u+2

It gives the error message Invalid color string "+1 --color=u+2".

This one works as intended, using shortcut option names:

#env
LESS = -R --use-color -Dd+1 -Du+2

But if we put --use-color later in the options, it breaks again:

#env
LESS = -R -Dd+1 -Du+2 --use-color

It also breaks with short options and specifying background color:

#env
LESS = -R --use-color -Dd+1.2 -Du+3.4

From the command line, it works fine with long options (and a blank lesskey file):

less -R --use-color --color=d+1 --color=u+2

It seems the argument parser is not able to tell when the end of the color string is.

@christian-oudard christian-oudard changed the title Cannot use --color in lesskey file. Cannot use multiple --color options in long format in a lesskey file. Sep 18, 2022
@christian-oudard christian-oudard changed the title Cannot use multiple --color options in long format in a lesskey file. 8-bit color strings break in a lesskey file. Sep 18, 2022
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

No branches or pull requests

1 participant