[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
Tue May 22 20:19:00 UTC 2012


Bugs item #313649, was opened at 2012-05-22 16:18 by Christian von Roques
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=313649&group_id=100114

Status: Open
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: None
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.


----------------------------------------------------------------------

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