Files
dots/common/.config/fish/functions/bind_M_n_history.fish
T
2026-09-17 20:45:06 +02:00

18 lines
474 B
Fish

function bind_M_n_history
for i in (seq 9)
set -l command
if test (count $history) -ge $i
set command "commandline -r \$history[$i]"
else
set command "echo \"No history found for number $i\""
end
if contains fish_vi_key_bindings $fish_key_bindings
bind -M default \e$i "$command"
bind -M insert \e$i "$command"
else
bind \e$i "$command"
end
end
end