summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2019-11-25 13:53:31 +0100
committerFlorian Pritz <bluewind@xinu.at>2020-01-25 16:04:09 +0100
commit28efc78ab27e70ba55ed1f5c6a5252918f4b9c6a (patch)
tree2e252336eb01aed7aac7ca5f8f794f905829402e
parent242ed314a469f85878cbee61e443065d88cc6252 (diff)
downloaddotfiles-28efc78ab27e70ba55ed1f5c6a5252918f4b9c6a.tar.gz
dotfiles-28efc78ab27e70ba55ed1f5c6a5252918f4b9c6a.tar.xz
zshrc: Add kill-dir hotkey
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--.zshrc8
1 files changed, 8 insertions, 0 deletions
diff --git a/.zshrc b/.zshrc
index a47b85e..e0b6517 100644
--- a/.zshrc
+++ b/.zshrc
@@ -113,6 +113,14 @@ bindkey "^[OB" history-beginning-search-forward
bindkey "^[[A" history-beginning-search-backward
bindkey "^[[B" history-beginning-search-forward
+backward-kill-dir () {
+ local WORDCHARS=${WORDCHARS/\/}
+ zle backward-kill-word
+ }
+zle -N backward-kill-dir
+# alt + backspace
+bindkey '^[^?' backward-kill-dir
+
# HOWTO make your own:
# bindkey '<crtl+v key>' action
# for some actions run `bindkey`