mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 06:26:39 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user