[fish] big change

This commit is contained in:
Afonso Franco 2025-03-16 01:09:34 +00:00
parent 7dac57412d
commit 578c6b3208
Signed by: afonso
SSH key fingerprint: SHA256:PQTRDHPH3yALEGtHXnXBp3Orfcn21pK20t0tS1kHg54
5 changed files with 107 additions and 16 deletions

View file

@ -1,5 +1,3 @@
# Credits to https://github.com/BrewingWeasel/fishbang
function last_history_item
echo $history[1]
end
@ -57,7 +55,3 @@ abbr -a !^ --position anywhere --function first_history_arg # !^ returns the fir
abbr -a !\$ --position anywhere --function last_history_arg # !$ returns the last argument of the last command
abbr -a !\* --position anywhere --function history_args # !* returns all arguments of the last command
abbr -a bang_nth_arg --position anywhere --regex '!:([0-9]*)' --function nth_history_arg # !$ returns the last argument of the last command
bind -M insert enter expand-abbr execute
bind -M default enter expand-abbr execute
bind enter expand-abbr execute