bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ctrl-w oddity on bash-4.4


From: Chet Ramey
Subject: Re: ctrl-w oddity on bash-4.4
Date: Wed, 25 Oct 2017 09:48:14 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

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    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]