-
Notifications
You must be signed in to change notification settings - Fork 80
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
[FEATURE] new flag to override '-F/--quit-if-one-screen' #467
Comments
I'm not familiar with fzf, but I can't seem to reproduce this based on your description. In the last step, fzf opens and displays a file list on the bottom left, and the contents of the first file at the right. It doesn't immediately close. However, regarding what I think the issue is, you can override any option in your LESS variable by using the
|
Indeed, you need to also press ⏎ Enter on the chosen file. This should open the file in
Thank you. This is precisely what I was searching for. The issue has been resolved. The shorter version works fine for me, but the longer version produces an error. less --version
# less 643 (PCRE2 regular expressions)
# …
cat README.md | less --+quit-if-one-screen
# No +quit-if-one-screen option exists ("less --help" for help) But I see it has already been reported and fixed. Ref #452. |
I suggest the introduction of a new flag that can override the
-F/--quit-if-one-screen
option.The reason for this is that I frequently use
fzf
and its--execute
flag to open selected fileswith the
less
pager. However, in my setup,LESS
is assigned with the--quit-if-one-screen
option. This causes an issue when I try to view a file with a small number of lines because the
window immediately closes.
Personal LESS setup
To reproduce this issue:
LESS
with the--quit-if-one-screen
in your.bashrc/.zshrc
:files. If the file contains more lines than can fit on your screen, the file will remain open,
allowing you to interact with it normally. However, if the number of lines is too small, it will
immediately close itself:
Currently, a workaround is to check if
LESS
has been set and thenunset
it. However, thisremoves all the user customizations set by
LESS
.The introduction of a flag to override the
--quit-if-one-screen
would be a beneficial solution.The text was updated successfully, but these errors were encountered: