[Bash-completion-devel] [bash-completion-Bugs][313649] __reassemble_comp_words_by_ref wrong cword if COMP_CWORD == ${#COMP_WORDS[@]}
bash-completion-bugs at alioth.debian.org
bash-completion-bugs at alioth.debian.org
Sat Aug 11 17:21:37 UTC 2012
bash-completion-Bugs item #313649, was changed at 2012-08-11 21:21 by Igor Murzov
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=313649&group_id=100114
>Status: Closed
Priority: 3
Submitted By: Christian von Roques (roques-guest)
Assigned to: Nobody (None)
Summary: __reassemble_comp_words_by_ref wrong cword if COMP_CWORD == ${#COMP_WORDS[@]}
Distribution: --Distribution-Agnostic--
Originally reported in: None
Milestone: None
>Status: Fix Committed
Original bug number:
Initial Comment:
Here is what currently happens:
$ COMP_WORDS=( prog foo = bar )
$ COMP_CWORD=4
$ unset words cword
$ __reassemble_comp_words_by_ref = words cword
$ echo "(${words[@]})" $cword
(prog foo=bar) 4
However, I expect $cword to be set to 2.
The attached patch accomplishes this.
----------------------------------------------------------------------
>Comment By: Igor Murzov (garik-guest)
Date: 2012-08-11 21:21
Message:
Fixed in commit: http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=commit;h=dc150937d126430f5cc20dfaf3239a71049fe0df
Thank you for the patch.
----------------------------------------------------------------------
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=313649&group_id=100114
More information about the Bash-completion-devel
mailing list