On 10/22/17 6:52 PM, Aron Griffis wrote:
> I'm seeing some strange behavior and don't know if it's a bug or intended.
> 
> Reproducer:
> 1. env INPUTRC=/dev/null bash --norc
> 2. set -o vi
> 3. true --foo=bar
> 4. up arrow, then left arrow to put the cursor on the equals sign
> 5. press ctrl-w, nothing happens

Posix says the word boundaries for ^W in insert mode are characters that
aren't <blank> or <punct>. So you deal with the character before the
cursor (`o'), and delete to a character that isn't <blank> or <punct>.
Since the `o' is in neither character class, it's the word boundary, and
you don't delete anything. FWIW, ksh93 behaves the same way (but beeps
annoyingly).

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to