diff --git a/.config/fish/config.fish b/.config/fish/config.fish index d714361..2a3c192 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -1,3 +1,27 @@ if status is-interactive # Commands to run in interactive sessions can go here end + +function bind_bang + switch (commandline -t)[-1] + case "!" + commandline -t -- $history[1] + commandline -f repaint + case "*" + commandline -i ! + end +end + +function bind_dollar + switch (commandline -t)[-1] + case "!" + commandline -f backward-delete-char history-token-search-backward + case "*" + commandline -i '$' + end +end + +function fish_user_key_bindings + bind ! bind_bang + bind '$' bind_dollar +end diff --git a/README.md b/README.md index f312ce6..989d002 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Another attempt at creating a consistent and modular dotfiles configuration * `fish`: shell * `neovim`: editor +* `yazi`: file manager ## Installation ##