zenu

Des menus dans votre terminal - retour accueil

git clone git://bebou.netlib.re/zenu
Log | Files | Refs | README |

commit ccd07276ff78124e403d764b2f24d591c42d5d05
parent 3c27d13b5a79d9cc13b290275645054ef15896da
Auterice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Tue, 28 May 2024 15:09:35 +0200

sed -r -> sed -E

Pour ĂȘtre posix

Diffstat:
Mbin/build | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/bin/build b/bin/build @@ -17,21 +17,21 @@ shift case "$cmd" in (-h|help|--help) usage -;; (face | -f) sed -rn '/^##/q;s/_(.)/\x1b[7m\1\x1b[m/;s/^/ /p' "$@" +;; (face | -f) sed -En '/^##/q;s/_(.)/\x1b[7m\1\x1b[m/;s/^/ /p' "$@" # Avoid Quoting hell (QH) with aliases: # with QH ;; (script | -s) <<-% cat - $( sed -rn '/^## *pre */,/^##/p' "$@" ) + $( sed -En '/^## *pre */,/^##/p' "$@" ) read -sk1 zenu_key case "\$zenu_key" in (\$'q') zenu-- - $( sed -rn '/^## *react */,/^##/p' "$@" ) + $( sed -En '/^## *react */,/^##/p' "$@" ) esac 2> \$zenu_store/err % # wo QH (require zsh) # ;; (script | -s) -# alias _zenu_hook_preprocess=$( sed -rn '/^## *pre */,/^##/p' "$@" ) -# alias _zenu_hook_react=$( sed -rn '/^## *react */,/^##/p' "$@" ) +# alias _zenu_hook_preprocess=$( sed -En '/^## *pre */,/^##/p' "$@" ) +# alias _zenu_hook_react=$( sed -En '/^## *react */,/^##/p' "$@" ) # _zenu_action_builder() { # _zenu_hook_preprocess # read -sk1 zenu_key @@ -42,7 +42,7 @@ in (-h|help|--help) usage # } # echo $functions[_zenu_action_builder] ;; (emph| -e) - sed -rn '/^##/q;s/(.*)_((.).*)/\3 \1\2 /;p' "$@" | awk ' + sed -En '/^##/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] }