bug-bash
[Top][All Lists]
Advanced

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

Filename completion adds extra chars to command line


From: jerry
Subject: Filename completion adds extra chars to command line
Date: Fri, 3 Jun 2005 05:32:47 -0700

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: cygwin
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='i686-pc-cygwin'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H -DRECYCLES_PIDS  -I.  -I/tmp/bash-3.0
-I/tmp/bash-3.0/include -I/tmp/bash-3.0/lib   -O2
uname output: CYGWIN_NT-5.0 PN100-01-1-123s 1.5.17(0.129/4/2) 2005-05-25
19:38 i686 unknown unknown Cygwin
Machine Type: i686-pc-cygwin

Bash Version: 3.0
Patch Level: 16
Release Status: release

Description:

After hitting TAB twice for a list of possible candidates for filenames,
the command line following the list has too many characters on it.  It
may
be that the shell is not properly accounting for escape code in the
prompt.

This problem does not occur with command name completion.


Here is a sample:

123 scripts > ls CVS/            - Hit TAB twice
Entries     Repository  Root
123 scripts > ls CVS/ CVS/

Using the backspace key to try to erase the entire command, leaves:

123 scripts > ls CV


Another sample:

127 scripts > ls /usr/bin/zip
zip.exe       zipgrep       zipnote.exe
zipcloak.exe  zipinfo       zipsplit.exe
127 scripts > ls /usr/bin/zipn/zip

Backspacing to erase the command leaves behind:

127 scripts > ls /u


My prompt is defined as:

PS1='\[\e]2;\w\007\]\[\e[1;31m\]\# \[\e[32m\]\W \[\e[36m\]> \[\e[0m\]'


As an example of command name completion (which doesn't show this
problem):

126 scripts > ln                 - Hit TAB twice
ln.exe       lnkstub.exe
126 scripts > ln

Backspacing to erase the command leave just the prompt (as it should).


Repeat-By:

Set prompt to:

PS1='\[\e]2;\w\007\]\[\e[1;31m\]\# \[\e[32m\]\W \[\e[36m\]> \[\e[0m\]'

Test filename completion with:  ls /usr/bin/zip<TAB><TAB>

Observe extra chars added to command line.

Backspace to erase the command line.  Observes that extra characters
remain after the prompt.


Fix:

(I have no fix to offer.)





reply via email to

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