Des menus dans votre terminal - retour accueil
git clone git://bebou.netlib.re/zenu
Log | Files | Refs |
commit b4ee6951d34e7e8855d13d8d414de5fddae64b12 parent a69009e004a5b7a4ae926b92c1aceb215ffa5ed6 Auterice: Marc Chantreux <mc@unistra.fr> Date: Tue, 25 Apr 2023 15:02:27 +0200 error messsages are recorded then displayed Diffstat:
M | zenu.zsh | | | 17 | +++++++++++------ |
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/zenu.zsh b/zenu.zsh @@ -1,4 +1,4 @@ -: ${zenu_store:=$( mktemp -d )} +zenu_store=$( mktemp -d /dev/shm/zenu.$$.XXX ) trap "rm -rf $zenu_store" EXIT zenu.up() { @@ -48,11 +48,16 @@ zenu.loop() { in (0) return ;; (1) zenu.update ;; (*) - set $zenu_base/$zenu_stack[-1] - paste $zenu_store/{1..$[$#zenu_stack-1]} $1.face | sed 's/\t/│/g' - . $1.script - # echo paste $zenu_store/{1..$[$#zenu_stack-1]} $zenu_base/$zenu_stack[-1].face - # exit + local c=${zenu_base?path of this zenu}/$zenu_stack[-1] + set $zenu_store/{1..$[$#zenu_stack-1]} $c.face + paste "$@" | sed 's/\t/│/g' + echo + test -s $zenu_store/err && { + echo -n $'\e[31;47m' + cat -- $zenu_store/err + echo -n $'\e[0m' + } >&2 + . $c.script esac } }