Des menus dans votre terminal - retour accueil
git clone git://bebou.netlib.re/zenu
Log | Files | Refs |
commit e25c5dd32b6a37e318ea6ec4fad1c8d9f4242aaf parent a2342904cdad40c4eca7a064946b8a6af37c7e2f Auterice: Arthur Pons <arthur.pons@unistra.fr> Date: Mon, 29 Apr 2024 15:45:00 +0200 Retour en arrière = q, marqueur accé = _ Et pour les personnes qui veulent des _ dans leurs noms de menus elles pourront s'adapter. Diffstat:
M | bin/build | | | 6 | +++--- |
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/bin/build b/bin/build @@ -17,14 +17,14 @@ shift case "$cmd" in (-h|help|--help) usage -;; (face | -f) sed -rn '/^##/q;s/\x1f(.)/\x1b[7m\1\x1b[m/;s/^/ /p' "$@" +;; (face | -f) sed -rn '/^##/q;s/_(.)/\x1b[7m\1\x1b[m/;s/^/ /p' "$@" # Avoid Quoting hell (QH) with aliases: # with QH ;; (script | -s) <<-% cat $( sed -rn '/^## *pre */,/^##/p' "$@" ) read -sk1 zenu_key case "\$zenu_key" - in (\$'\n') zenu-- + in (\$'q') zenu-- $( sed -rn '/^## *react */,/^##/p' "$@" ) esac 2> \$zenu_store/err % @@ -42,7 +42,7 @@ in (-h|help|--help) usage # } # echo $functions[_zenu_action_builder] ;; (emph| -e) - sed -rn '/^##/q;s/(.*)\x1f((.).*)/\3 \1\2 /;p' "$@" | awk ' + sed -rn '/^##/q;s/(.*)_((.).*)/\3 \1\2 /;p' "$@" | awk ' {line[i++]=$0} (l=length)>m {m=l} END { for (i=0; i<until ; ++i) printf "%-*s\n", m, line[i] }