From 3ea4e2fe6b599958d1f17722613fa1b28bd4f7f3 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 30 Aug 2019 16:50:03 +0200 Subject: zsh: improve argument-killing widgets --- zsh/.config/zsh/.zshrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'zsh') 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]} -- cgit 1.4.1