Jonathan Nieder wrote:

> Bash 4.0 changed the rules for completion word splitting so that
> they are incompatible with 3.x.  I think some Breaks: will be needed
> to ensure smooth upgrades.
Just FYI: Ah, at last some clarity!

>From the bash 3 manual:

 COMP_WORDS
        An array variable (see Arrays below) consisting of the
        individual words in the current command line.  The
        words are split on shell metacharacters as the shell
        parser would separate them.  This variable is
        available only in shell functions invoked by the
        programmable completion facilities (see Programmable
        Completion below).

>From the bash 4 manual:

 COMP_WORDS
        An array variable (see Arrays below) consisting of the
        individual words in the current command line.  The
        line is split into words as readline would split it,
        using COMP_WORDBREAKS as described above.  This
        variable is available only in shell functions invoked
        by the programmable completion facilities (see
        Programmable Completion below).

The workaround used by the bash-completion scripts is to paste words
from COMP_WORDS together (in _get_comp_words_by_ref).

If only the NEWS file had mentioned it. :)  



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to