[ADD][SHELL] Use lesspipe pager preprocessor
This preprocessor is different from bat in that it can display some information about binary files like archives or pdf files. It also does some syntax highlighting like bat.
This commit is contained in:
parent
e060a9ef6d
commit
9ebc52552a
|
@ -28,6 +28,10 @@ export LESS_TERMCAP_se=$'\E[0m' # reset reverse video
|
|||
export LESS_TERMCAP_us=$'\E[1;32m' # begin underline
|
||||
export LESS_TERMCAP_ue=$'\E[0m' # reset underline
|
||||
|
||||
# Use lesspipe as a file preprocessor (unlike bat, can somewhat read pdf)
|
||||
{ [ -x /usr/bin/lesspipe.sh ] && eval "$(lesspipe.sh)" } ||
|
||||
{ [ -x /usr/bin/lesspipe ] && eval "$(lesspipe)" } # Quoting seems necessary
|
||||
|
||||
# Use my preferred pager settings for bat
|
||||
export BAT_PAGER="$PAGER $LESS"
|
||||
|
||||
|
|
Loading…
Reference in a new issue