[Bash-completion-devel] Get stuck

Ville Skyttä ville.skytta at iki.fi
Wed May 25 17:59:30 UTC 2011


On 05/25/2011 11:52 AM, Igor Murzov wrote:

>   upgradepkg old_package_name%new_package_name
> I want to handle this notation in completion. I need to complete filenames and 
> directories after '%'. I wrote two variants of completion function, but none 
> of them works as expected. Actually, prefix not disappears anymore, but now I 
> get extra space after directory names.

I don't have a solution for the problem, but I noticed that both your
functions are trying to remove % from COMP_WORDBREAKS which I don't
think is necessary, % is not included in it by default.  Maybe try to
add % to it instead and see if that leads to something useful?

$ bash --norc
$ echo "$COMP_WORDBREAKS"
 	
"'@><=;|&(:

BTW, no need to Cc me for messages on this list.



More information about the Bash-completion-devel mailing list