mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-31 04:53:01 +02:00
The -S switch to less seemed at the time a good idea -- chop off too long lines and allow horizontal scrolling -- however, the -F option, to skip pager for content that fit the first screen is overridden by the -S switch. This makes commands like "show containers", and similar that normally have waaaaay too few lines for a pager to always page. So let's drop -S to regain the original behavior. This will cause lines to be wrapped, but with the new raw mode in the CLI this seems to work without any weird screen artifacts. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
15 lines
637 B
Bash
Executable File
15 lines
637 B
Bash
Executable File
#!/bin/sh
|
|
# -d ;; suppress error message "the terminal is dumb"
|
|
# -F :: exit if the entire file can be displayed on the first screen
|
|
# -I :: Ignore case, even for patterns
|
|
# -K :: exit immediately when an interrupt character (usually ^C) is typed
|
|
# -R :: Almost raw control charachters, only ANSI color escape sequences and
|
|
# OSC 8 hyperlink sequences are output. Allows veritcal scrolling
|
|
# -X :: No termcap initialization and deinitialization set to the terminal.
|
|
# This is what leaves the contents of the output on screen.
|
|
|
|
export LESS="-P %f (press h for help or q to quit)"
|
|
export LANG=en_US.UTF-8
|
|
|
|
less -RIKd -FX "$@"
|