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

--prompt= option doesn't work with --intr= option. #495

Closed
arcmags opened this issue Mar 31, 2024 · 2 comments
Closed

--prompt= option doesn't work with --intr= option. #495

arcmags opened this issue Mar 31, 2024 · 2 comments

Comments

@arcmags
Copy link

arcmags commented Mar 31, 2024

Setting a prompt doesn't work when the --intr= option is used.

LESS='--prompt=test' less <file> sets the prompt to test as expected, while the following command fails to set the prompt:

LESS='--intr=c --prompt=test' less <file>

Version: less 643

@gwsw
Copy link
Owner

gwsw commented Mar 31, 2024

Since the --intr option takes a string parameter, it needs to be terminated with a dollar sign, like

LESS='--intr=c$ --prompt=test' less <file>

Since only the first character or two characters (in the case of a caret followed by a character) are significant, the dollar sign requirement is somewhat nonintuitive. I will leave this issue open as an enhancement request to not require the dollar sign.

@gwsw
Copy link
Owner

gwsw commented Apr 1, 2024

Fixed in 3440a1d.
The --intr option, as well as a few other options which take a string parameter, can be terminated with a space as well as with a dollar sign.

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

2 participants