Bug 1477328 - Ctrl-W (erase word) in vi editing-mode has wrong behavior
Summary: Ctrl-W (erase word) in vi editing-mode has wrong behavior
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: readline
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaromír Cápík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-01 19:40 UTC by John Florian
Modified: 2017-08-02 15:43 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-02 15:43:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description John Florian 2017-08-01 19:40:59 UTC
Description of problem:
Ctrl-w now stops at word-breaking characters rather than spaces as it's done for a very long time.

Version-Release number of selected component (if applicable):
d13677@mdct-dev12

How reproducible:
always

Steps to Reproduce:
1. set -o vi
2. ls /etc/hosts.allow^w


Actual results:
Only "allow" is erased in F26.

Expected results:
With F25 and prior the entire path would be erased.


Additional info:
- Only vi mode seems affected.
- I can bind vi-unix-word-rubout to keys other than ctrl-w and get the expected behavior but I can't seem to even kludge ctrl-w into the old behavior, including tricks like "stty werase 00".
- "bind -p" shows the correct mapping.

Comment 1 John Florian 2017-08-01 19:49:07 UTC
Meh, version above was bad copy/paste.  Here we go:

readline-7.0-5.fc26.x86_64

Comment 2 John Florian 2017-08-02 15:43:56 UTC
Turns out this not a bug but rather a change in defaults.  For others who find themselves in a similar situation:

CHANGES mentions:
m.  The default binding for ^W in vi mode now uses word boundaries specified
    by Posix (vi-unix-word-rubout is bindable command name).

The change I needed in ~/.inputrc to restore prior behavior was:

# This is necessary since ^W is the default stty werase character as readline
# will bind it to its vi-mode equivalent when that variable is enabled.
set bind-tty-special-chars off

# Bind to the old rubout feature rather than the new vi-unix-word-rubout feature.
+control-w: unix-word-rubout


Note You need to log in before you can comment on or make changes to this bug.