Un outil pour réarranger les lignes de stdin - retour accueil
git clone git://bebou.netlib.re/reorder
Log | Files | Refs | README |
commit c379a42f95ddd76c355d4df222dee533a7e12c82 parent 7a697a7d4af81b8cdef32cf87f3d21639188f7c7 Auterice: Arthur Pons <arthur.pons@unistra.fr> Date: Mon, 1 Jul 2024 16:59:41 +0200 Sortir avec spam de echap Diffstat:
M | reorder | | | 6 | ++++-- |
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/reorder b/reorder @@ -37,9 +37,10 @@ lastline=$(< $file wc -l) mode="Looking" modify $curline $prevline + xev | stdbuf -o0 grep "KeyPress" -A2 | - stdbuf -o0 grep -Eo "(Up|Down|Return)" | + stdbuf -o0 grep -Eo "(Up|Down|Return|Escape)" | while read key;do case "$key" in (Up) @@ -54,8 +55,9 @@ xev | prevline=$curline [ "$mode" = "Looking" ] && mode="Selecting" || mode="Looking" reset ;; - (*) break ;; + (*) echo $key;exit 0 ;; esac modify $curline $prevline echo $key + echo "Pour sortir appuyer plusieurs fois sur echap" done