Adding a kill to slash binding to alt-backspace
authorFrank Terbeck <ft@grml.org>
Wed, 8 Dec 2010 11:59:54 +0000 (12:59 +0100)
committerFrank Terbeck <ft@grml.org>
Wed, 8 Dec 2010 11:59:54 +0000 (12:59 +0100)
As requested by mika, mrud and kafux.

I'm binding the widget to "M-C-h" and "M-C-?" because those are common
codes send by the backspace key in various terminals (and sometimes
terminfo lies about it).

etc/zsh/zshrc

index a8b887a..57c10ee 100644 (file)
@@ -635,6 +635,10 @@ zle -N slash-backward-kill-word
 
 #k# Kill everything in a word up to its last \kbd{/}
 bindkey '\ev' slash-backward-kill-word
+#k# Kill everything in a word up to its last \kbd{/}
+bindkey '\e^h' slash-backward-kill-word
+#k# Kill everything in a word up to its last \kbd{/}
+bindkey '\e^?' slash-backward-kill-word
 
 # use the new *-pattern-* widgets for incremental history search
 if is439 ; then