Add support for source highlighting in less on Linux

On Ubuntu at least, the relevant script is not added to the PATH, so we
manually have to check for it's complete installation path.
This commit is contained in:
2020-05-03 16:02:18 +01:00
parent 542922cde5
commit 17dcac4d75

View File

@@ -8,4 +8,7 @@ alias le="less"
if (( $+commands[src-hilite-lesspipe.sh] )); then
export LESSOPEN="| src-hilite-lesspipe.sh %s"
export LESS=" -R "
elif [ -f "/usr/share/source-highlight/src-hilite-lesspipe.sh" ]; then
export LESSOPEN="| /usr/share/source-highlight/src-hilite-lesspipe.sh %s"
export LESS=" -R "
fi