[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
shell-backward-kill-word needs to behave more like werase
From: |
Basin Ilya |
Subject: |
shell-backward-kill-word needs to behave more like werase |
Date: |
Tue, 29 Jun 2021 00:44:36 +0300 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
The default werase setting erases the series of white spaces before the caret,
then it erases the preceding word (without touching the spaces before the word).
I expected that shell-backward-kill-word would do the same with the difference
that the entire quoted argument would be erased.
However, shell-backward-kill-word erases the word immedeately preceding the
caret plus it erases one additional space. This causes the inconvenience that
after erasing the shell word you can't immediately type a new word. You have to
type again a space that was deleted. I tried to restore the missing space using
sequence of commands, but it restores an unwanted space after erasing the very
first word:
stty werase undef
bind '"\C-\xff": delete-horizontal-space' # erase whitespaces following the
word
bind '"\C-\xfe": shell-backward-kill-word' # erase the word
bind '"\C-w": "\C-\xff\C-\xfe "' # erase whitespaces, erase word, restore 1
space
- shell-backward-kill-word needs to behave more like werase,
Basin Ilya <=