From ab5148150c743794da406a609e821da0cf2f7098 Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Mon, 4 Dec 2023 12:04:52 +0100 Subject: [PATCH] Alias pour cat et meilleure utilisation de source-highlight --- bin/qemush | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bin/qemush b/bin/qemush index b1ce775..92eb503 100755 --- a/bin/qemush +++ b/bin/qemush @@ -16,13 +16,9 @@ exec_as qemu "$@" bin=bin images=images -if [ -t 1 ]; then - cat=src-hilite-lesspipe.sh -else - cat='cat' -fi PATH="./${bin}:${PATH}" EDITOR="${EDITOR:-nvim}" +[ -t 1 ] && alias cat='source-highlight -o STDOUT -f esc' alias ls='ls --color=auto' alias exec='exec ' shopt -s expand_aliases @@ -109,7 +105,7 @@ public_shell() { } public_cat() { - exec "$cat" "${bin}/${1}" + exec cat "${bin}/${1}" } function="$1"