Add zle widget to remove path components backwards
authorChristoph Egger <christoph@christoph-egger.org>
Wed, 6 Apr 2016 14:15:45 +0000 (16:15 +0200)
committerChristoph Egger <christoph@christoph-egger.org>
Wed, 6 Apr 2016 14:15:45 +0000 (16:15 +0200)
zshrc

diff --git a/zshrc b/zshrc
index fd2baf2825bdb7838379deb6cb5315c4affd1f8b..7936b57fed28724b01619fc1cb844fe7acdb24bd 100644 (file)
--- a/zshrc
+++ b/zshrc
@@ -146,3 +146,10 @@ export PATH
 export FPATH
 
 alias wb="ssh -t buildd.debian.org wb"
+
+# remove word, not including /
+function _backward_kill_default_word() {
+  WORDCHARS='*?_-.[]~=&;!#$%^(){}<>' zle backward-kill-word
+}
+zle -N backward-kill-default-word _backward_kill_default_word
+bindkey -e '\e=' backward-kill-default-word