From 78e73557e9d95754ad03fc183ee637bb72aa9ba1 Mon Sep 17 00:00:00 2001 From: Shawn Anderson Date: Wed, 23 Dec 2020 02:53:25 -0800 Subject: [PATCH] Create a delete function for deleting a single character and overbind ctrl-d to that function. This will prevent fish from exiting when I hit ctrl-d, I use ctrl-d for things like ipython. I don't want to quit fish so easy, I can use leader-x in tmux for that. --- dotfiles/.config/fish/config.fish | 1 + dotfiles/.config/fish/functions/delete.fish | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 dotfiles/.config/fish/functions/delete.fish diff --git a/dotfiles/.config/fish/config.fish b/dotfiles/.config/fish/config.fish index e22c36f..99ecd2a 100644 --- a/dotfiles/.config/fish/config.fish +++ b/dotfiles/.config/fish/config.fish @@ -58,3 +58,4 @@ abbr python python set -gx GOPATH $HOME/go; set -gx GOROOT $HOME/.go; set -gx PATH $GOPATH/bin $PATH; # g-install: do NOT edit, see https://github.com/stefanmaric/g abbr cat batcat abbr pip pip3 +bind \cd delete diff --git a/dotfiles/.config/fish/functions/delete.fish b/dotfiles/.config/fish/functions/delete.fish new file mode 100644 index 0000000..e23223f --- /dev/null +++ b/dotfiles/.config/fish/functions/delete.fish @@ -0,0 +1,3 @@ +function delete +commandline -f delete-char +end