Bash style history substitution for Oh My Fish.
This plugin wraps Aerys Bat's implementation of bash style history substitution.
$ omf install https://github.com/manos00/plugin-bang-bang
!!
on command line will be replaced by last command issued:
$ cp ~/.dmrc
cp: missing destination file operand
$ !! ~/.dmrc.bak
!$
on command line will be replaced by last command arguments:
$ mkdir /tmp/test
$ cd !$
!S
on command line will be replaced by "sudo" plus last command:
$ mv /etc/hostname /etc/hostname.old
mv: rename /etc/hostname to /etc/hostname.old: Operation not permitted
$ !S
If the keybindings fail to work after installing the plugin, the issue is
likely because of an existing ~/.config/fish/functions/fish_user_key_bindings.fish
that is overiding the plugins.
The solution is to either removing the exising file or to concat the contents of the
plugin functions/fish_user_key_bindings.fish
file into it.
MIT © original creators and me