bug-bash
[Top][All Lists]
Advanced

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

Re: Resolving quoted COMP_CWORD on bash-4


From: Chet Ramey
Subject: Re: Resolving quoted COMP_CWORD on bash-4
Date: Fri, 18 Sep 2009 14:41:14 -0400
User-agent: Thunderbird 2.0.0.23 (Macintosh/20090812)

Freddy Vulto wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: i686
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
> -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/share/locale'
> -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include
> -I./lib   -g -O2
> uname output: Linux myhost 2.6.28-15-generic #49-Ubuntu SMP Tue Aug 18
> 18:40:08 UTC 2009 i686 GNU/Linux
> Machine Type: i686-pc-linux-gnu
> 
> Bash Version: 4.0
> Patch Level: 28
> Release Status: release
> 
> On bash-4, when completing:
> 
>     $ a 'b c
> 
> The COMP_CWORD variables contain:
> 
>     COMP_CWORD: 3
>     COMP_CWORDS:
>     0: a
>     1: '
>     2: b
>     3: c
> 
> Whereas on bash-3 they contained:
> 
>     COMP_CWORD: 1
>     COMP_CWORDS:
>     0: a
>     1: 'b c
> 
> I know that bash-4 has changed:
> 
>     i. The programmable completion code now uses the same
>        set of characters as readline when breaking the command
>        line into a list of words.

That change in how quoted words are treated was unintended, and clearly
a bug.  I will fix it, and the fix will be in bash-4.1.  It may also be
released as a patch; I have to see how extensive the changes will be.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/




reply via email to

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