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
+19
View File
@@ -0,0 +1,19 @@
function __fg_select --description 'Bring a background/stopped job to foreground, picking via fzf when multiple'
set -l jobs_list (jobs | string match -r '^[0-9]+\t.*')
set -l n (count $jobs_list)
if test $n -eq 0
echo 'no background jobs' >&2
return 1
end
set -l picked
if test $n -eq 1
set picked $jobs_list[1]
else
set picked (printf '%s\n' $jobs_list | fzf --no-multi --prompt='fg> ')
or return 1
end
set -l id (string match -r '^([0-9]+)\t' -- $picked)[2]
fg %$id
end