From 9881409b404e86f7c4a91e47639ea3c6df6c8f50 Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Wed, 29 Nov 2023 14:57:46 +0100 Subject: [PATCH] qemush : fonction cat --- bin/qemush | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/qemush b/bin/qemush index 5b13770..d0258a5 100755 --- a/bin/qemush +++ b/bin/qemush @@ -16,6 +16,11 @@ 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}" @@ -101,6 +106,10 @@ public_shell() { bash -i } +public_cat() { + "$cat" "${bin}/${1}" +} + function="$1" shift