Re: Bug in 'more' command
Jim Anderson <jjanders@ptd.net> writes:
> One time usage is not bad, but if you use 'more' often, as I do, this behavior is a repeating waste of time. I hope the developers will
> revert to the traditional behavior.
I doubt that but who knows.
For decades, I've had an alias like this:
alias l="ls -lF|more"
Convenient, no pager unless the directory listing is long. And now it's
become this code:
more_version=$(more --version|awk '{print $4}'|cut -d. -f1-2)
if [[ $more_version -ge 2.38 ]]
then
alias l='ls -lF|more --exit-on-eof'
else
alias l='ls -lF|more'
fi
While it's probably fragile it works well enough in my usual Linux
environments which are Debian 11 & 12, Ubuntu 20.04, RedHat 8.
I mostly use less as a pager but increasingly bat for its color syntax
highlighting support for loads of formats.
Reply to: