diff options
author | Alan Pearce | 2019-08-30 16:50:03 +0200 |
---|---|---|
committer | Alan Pearce | 2019-08-30 16:50:03 +0200 |
commit | 3ea4e2fe6b599958d1f17722613fa1b28bd4f7f3 (patch) | |
tree | 94815fb4bd58ec45b52d4dcb957e896729874abd | |
parent | 9f5f996b0034949f447ecab9c5d3ab1a3c6794e7 (diff) | |
download | dotfiles-3ea4e2fe6b599958d1f17722613fa1b28bd4f7f3.tar.lz dotfiles-3ea4e2fe6b599958d1f17722613fa1b28bd4f7f3.tar.zst dotfiles-3ea4e2fe6b599958d1f17722613fa1b28bd4f7f3.zip |
zsh: improve argument-killing widgets
-rw-r--r-- | zsh/.config/zsh/.zshrc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index ea696e7..9be59a1 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -87,17 +87,23 @@ forward-argument () { zle forward-word } +backward-kill-argument () { + local WORDCHARS="\!\`~#@$%^&*()-_=+[{]}\|;:,<.>/?\'\"" + zle backward-kill-word +} + kill-argument () { local WORDCHARS="\!\`~#@$%^&*()-_=+[{]}\|;:,<.>/?\'\"" - zle backward-argument zle kill-word } zle -N backward-argument zle -N forward-argument zle -N kill-argument +zle -N backward-kill-argument bindkey '\e^b' backward-argument bindkey '\e^f' forward-argument +bindkey '\e^d' backward-kill-argument bindkey '\e^k' kill-argument sort=${commands[gsort]:-$commands[sort]} |