bug-bash
[Top][All Lists]
Advanced

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

Re: Bash completion buggy if -o nospace, -o filenames and -W used togeth


From: Chet Ramey
Subject: Re: Bash completion buggy if -o nospace, -o filenames and -W used together.
Date: Sun, 28 Aug 2005 16:50:07 -0400
User-agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716)

Christian Boltz wrote:
> Hello,
> 
> I've found a bug in bash autocompletion...
> 
> 
> Configuration Information [Automatically generated, do not change]:
> Machine: i586
> OS: linux
> Compiler: gcc -I/usr/src/packages/BUILD/bash-3.0 
> -L/usr/src/packages/BUILD/bash-3.0/../readline-5.0
> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' 
> -DCONF_OSTYPE='linux' -DCONF_MACHTYPE='i586-suse-linux' 
> -DCONF_VENDOR='suse' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' 
> -DSHELL -DHAVE_CONFIG_H  -I.  -I. -I./include -I./lib   -O2 -march=i586 
> -mcpu=i686 -fmessage-length=0 -Wall -g -D_GNU_SOURCE -Wall -pipe -g 
> -fbranch-probabilities
> uname output: Linux cboltz 2.6.11.4-21.7-default #1 Thu Jun 2 14:23:14 
> UTC 2005 i686 i686 i386 GNU/Linux
> Machine Type: i586-suse-linux
> 
> Bash Version: 3.0
> Patch Level: 16
> Release Status: release
> 
> Description:
>     Bash completion is buggy if -o nospace, -o filenames and -W are
>     used together. See the commented example below.

When you specify `-o filenames', one of the things that is enabled is
filename quoting.  Since `=' is one of the characters that causes word
breaks for the readline completion code, it gets quoted with a
backslash.  Readline can't distinguish between completed filenames and
completions generated by arguments to `-W'.

> 
>     If you let one of the options away, the problem doesn't occour.
>     Also -o dirnames instead of -o filenames works well.

Removing `=' from $COMP_WORDBREAKS would probably satisfy you as well.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
                                                Live...Laugh...Love
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/




reply via email to

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