zsh keybindings: make backward-kill-word act on whole quoted string
2
votes
3
answers
1859
views
When using Ctrl+w or Alt+Backspace or Alt+d keyboard shortcuts to delete words backward/forward, I know I can define the WORDCHARS characters:
WORDCHARS='~!#$%^&*(){}[]?.+;-'
for example, using Ctrl+w from the end of this string, will successively delete each word
echo aaa bbb ccc ddd eee
but if I have quoted strings, how can I treat the whole quoted block as one entity?
echo 'aaa bbb ccc' 'ddd eee fff'
so, Ctrl+w should delete whole 'ddd eee fff' in one go.
Same behavior should be for strings quoted with double quotes
"
Asked by Martin Vegter
(598 rep)
Aug 20, 2021, 10:12 AM
Last activity: Oct 22, 2022, 04:06 PM
Last activity: Oct 22, 2022, 04:06 PM