addet syntax highlighting?

This commit is contained in:
pika 2025-01-06 02:19:12 +01:00
parent 3ce5c8e5b7
commit 1d1e0ad2c6

View file

@ -166,8 +166,17 @@ _sensible.bash_() {
# export documents="$HOME/Documents"
# export dropbox="$HOME/Dropbox"
}
syntax_highlighting() {
export LESS='-R'
export BASH_PREEXEC_HOOKS=()
_syntax_highlighting() {
source-highlight -i $1 -o $1.html
less -R $1.html
}
}
_init() {
syntax_highlighting
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"