[Bash-completion-devel] scp remote path completion broken?
David Paleino
d.paleino at gmail.com
Wed Sep 16 22:12:26 UTC 2009
On Wed, 16 Sep 2009 23:34:51 +0200, Freddy Vulto wrote:
> I'm looking further into _get_cword, but COMP_CWORDS appears to behave
> differently depending on the bash-version.
Can this be because of: (http://tiswww.case.edu/php/chet/bash/NEWS)
i. The programmable completion code now uses the same set of characters as
readline when breaking the command line into a list of words.
> Can other people confirm this? Try this script:
>
> ---8<------------------------------------------
> _cword() {
> echo
> echo COMP_CWORD: $COMP_CWORD
> echo COMP_CWORDS:
> for ((i=0; i < ${#COMP_WORDS[@]}; i++)); do
> echo $i: "${COMP_WORDS[$i]}"
> done
> }
> complete -F _cword a
> ---8<------------------------------------------
>
> On bash-4 I get:
>
> $ a 'b c<TAB>
> COMP_CWORD: 3
> COMP_CWORDS:
> 0: a
> 1: '
> 2: b
> 3: c
Confirmed.
> Whereas on bash-3, bash-2 I get:
>
> $ a 'b c<TAB>
> COMP_CWORD: 1
> COMP_CWORDS:
> 0: a
> 1: 'b c
>
> Is this because of bash-4 or because of some other setting?
I can't confirm this (have a bash-3 system, but with an older bash-completion
too, and unable to copy it over there)
David
--
. ''`. Debian maintainer | http://wiki.debian.org/DavidPaleino
: :' : Linuxer #334216 --|-- http://www.hanskalabs.net/
`. `'` GPG: 1392B174 ----|---- http://snipr.com/qa_page
`- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20090917/227a7faf/attachment.pgp>
More information about the Bash-completion-devel
mailing list