Zsh: Use lesspipe.sh for LESSOPEN and lessp if it exists.
This commit is contained in:
parent
14ce8345e6
commit
5ad37b1396
@ -86,6 +86,8 @@ if command -v highlight > /dev/null; then
|
||||
LESSOPEN="| $(command -v highlight) --force --out-format=truecolor --style=base16/unikitty-reversible --stdout %s"
|
||||
elif command -v src-hilite-lesspipe.sh > /dev/null; then
|
||||
LESSOPEN="| $(command -v src-hilite-lesspipe.sh) %s"
|
||||
elif command -v lesspipe.sh > /dev/null; then
|
||||
LESSOPEN="| lesspipe.sh %s"
|
||||
elif command -v lesspipe > /dev/null; then
|
||||
LESSOPEN="| lesspipe %s"
|
||||
fi
|
||||
|
@ -65,7 +65,9 @@ alias cmake_static='cmake -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" -DBUILD_SHARED_LIBS
|
||||
alias crontab='crontab -i'
|
||||
|
||||
# Explicitly use lesspipe.
|
||||
if command -v lesspipe > /dev/null; then
|
||||
if command -v lesspipe.sh > /dev/null; then
|
||||
alias lessp='LESSOPEN="|lesspipe.sh %s" less'
|
||||
elif command -v lesspipe > /dev/null; then
|
||||
alias lessp='LESSOPEN="|lesspipe %s" less'
|
||||
fi
|
||||
# Follow mode does not work with highlight.
|
||||
|
Loading…
x
Reference in New Issue
Block a user