Alias pour cat et meilleure utilisation de source-highlight

This commit is contained in:
Hippolyte Chauvin 2023-12-04 12:04:52 +01:00
parent ad45725642
commit ab5148150c

View file

@ -16,13 +16,9 @@ exec_as qemu "$@"
bin=bin bin=bin
images=images images=images
if [ -t 1 ]; then
cat=src-hilite-lesspipe.sh
else
cat='cat'
fi
PATH="./${bin}:${PATH}" PATH="./${bin}:${PATH}"
EDITOR="${EDITOR:-nvim}" EDITOR="${EDITOR:-nvim}"
[ -t 1 ] && alias cat='source-highlight -o STDOUT -f esc'
alias ls='ls --color=auto' alias ls='ls --color=auto'
alias exec='exec ' alias exec='exec '
shopt -s expand_aliases shopt -s expand_aliases
@ -109,7 +105,7 @@ public_shell() {
} }
public_cat() { public_cat() {
exec "$cat" "${bin}/${1}" exec cat "${bin}/${1}"
} }
function="$1" function="$1"