isposix

Un outil pour savoir si une commande est posix - retour accueil

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

commit c913dd7c582c8ebf20db6dce44eebd25d008a56f
parent 80355d538e7066016c6b5a4e8bcd32ff45cbf142
Auteurice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Mon, 25 Nov 2024 19:51:10 +0100

xargs basename -> sed, beaucoup plus rapide

Diffstat:
Misposix.sh | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/isposix.sh b/isposix.sh @@ -9,8 +9,8 @@ _cmdnotposix() { _die "$cmd not posix" if command -V fzy 2>&1 > /dev/null;then fzcmd=$(find bdd -name '*.html' | - xargs -I{} basename {} | sed 's/\.html$//' | - fzy -e "$cmd" | head -n3) + sed -E 's,bdd/([^.]+)\.html,\1,' | + fzy -e "$cmd" | head -n3) fi [ -z "$fzcmd" ] \ && _die "$cmd" \