-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
shell:
fish, version 3.3.1
os:
ProductName: Mac OS X
ProductVersion: 10.15.7
BuildVersion: 19H1217
TERM:
xterm-256color
if I have a "tall" terminal, when I run history -c foo, if there are fewer entries than lines in my terminal and my pager is set to less, the pager immediately exits.
this is weird, so an example:
$ set -x PAGER less
$ tput lines
28
$ history -c foo | wc -l
26
$ time history -c foo
________________________________________________________
Executed in 20.90 millis fish external
usr time 20.11 millis 19.03 millis 1.08 millis
sys time 3.31 millis 1.13 millis 2.18 millis
$ set -x PAGER more
$ time history -c foo
...
<all lines of history -c foo shown>
...
________________________________________________________
Executed in 1.69 secs fish external
usr time 20.05 millis 18.91 millis 1.14 millis
sys time 3.66 millis 1.34 millis 2.32 millis
$
I'm using omf, but I've confirmed that the behavior exists with omf uninstalled. I've also tried in both iterm and terminal.app
if I make the terminal shorter, like 26 or even 27 lines, then the default PAGER of less works. I've also confirmed that something like,
$ cat <file-with-25-entries> | less
works as well. it's something about the interaction between fish and less that breaks. I don't have an exact version where this seems to have started, but I think this was working in the april timeframe.
Also, this seems to work fine on linux, fish version 3.2.2