mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix vi mode tab completion with spaces (#413)
Attempting to complete file names in vi mode using tab completion can fail if the last character on the command line is a space. Reproducer (note that this bug doesn't occur in emacs mode): $ set -o vi $ mkdir '/tmp/foo bar' $ test -d /tmp/foo\ <Tab> src/cmd/ksh93/edit/vi.c: - Don't disable tab completion or reset the tab count just because the last character on the command line is a space. This bugfix was backported from ksh93v- 2014-06-06. src/cmd/ksh93/tests/pty.sh: - Add a regression test for the tab completion bug.
This commit is contained in:
parent
ca5803419b
commit
1a9af9db40
4 changed files with 19 additions and 3 deletions
|
|
@ -946,5 +946,17 @@ u ^OK :child-!: \r\n$
|
|||
w exit
|
||||
!
|
||||
|
||||
touch "$tmp/foo bar"
|
||||
((SHOPT_VSH || SHOPT_ESH)) && tst $LINENO <<!
|
||||
L tab completion with space in string
|
||||
# https://github.com/ksh93/ksh/pull/413
|
||||
|
||||
d 15
|
||||
p :test-1:
|
||||
w echo $tmp/foo\\\\ \\t
|
||||
r ^:test-1: echo $tmp/foo\\\\ bar \\r\\n$
|
||||
r ^$tmp/foo bar\\r\\n$
|
||||
!
|
||||
|
||||
# ======
|
||||
exit $((Errors<125?Errors:125))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue