Bugs item #312740, was opened at 2010-10-04 21:58 by Ville Skyttä You can respond by visiting: https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312740&group_id=100114
Status: Open Priority: 3 Submitted By: Ville Skyttä (scop-guest) Assigned to: Nobody (None) Summary: _get_comp_words_by_ref with -n loses $prev Distribution: None Originally reported in: None Milestone: None Status: None Original bug number: Initial Comment: With -n, _get_comp_words_by_ref fails to set $prev at least when current word to be completed is empty and some words contained the characters supposed to be excluded with -n. Quick and dirty test: ------------- foo() { local cur prev words _get_comp_words_by_ref -n : cur prev words echo echo " cur:'$cur'" echo " prev:'$prev'" echo "words:'${wor...@]}'" } && complete -F foo foo ------------- Now, try completions like "foo a b:c <TAB>", "foo a:b <TAB>" (note space before <TAB>). cur and words seem to end up with the expected contents, but prev is empty. If there are no colons in the words to be completed, prev is populated ok as well. This is bash version 4.1.7(1)-release on Fedora 13, current bash completion git. ---------------------------------------------------------------------- You can respond by visiting: https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312740&group_id=100114 _______________________________________________ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/bash-completion-devel