feat(keybindings): scorciatoie fg-select, clear-repeat e palette

This commit is contained in:
2026-09-29 18:25:51 +02:00
parent b6f7b6fc68
commit a4f3f73dc1
6 changed files with 201 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
function __clear_repeat_loop --description "Re-run the last command on a timer, clearing the screen each iteration"
set -l last $history[1]
or return
read -l -P "Ripeti quante volte? (invio = infinito) " count
read -l -P "Ogni quanti secondi? (default 2) " sec
set -l sec (string match -r '^[0-9]+$' -- $sec)
or set sec 2
if test -z "$count"; or test "$count" -eq 0
while true
clear
eval $last
sleep $sec
end
else
for i in (seq $count)
clear
eval $last
sleep $sec
end
end
commandline -f repaint
end