[Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.3-349-ga0834d3

Ville Skyttä ville.skytta at iki.fi
Mon Jun 6 19:59:44 UTC 2011


On 06/06/2011 12:13 AM, Igor Murzov wrote:
> The following commit has been merged in the master branch:
> commit a0834d3bf49864f9e04fe07134ee6dc72b8bbc24
> Author: Igor Murzov <e-mail at date.by>
> Date:   Mon Jun 6 01:06:25 2011 +0400
> 
>     kcov: New completion
[...]
> +    if [[ "$cur" == -* ]]; then
> +        COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' -- "$cur" ) )
> +        [[ $COMPREPLY == *= ]] && compopt -o nospace
> +        return 0
> +    fi

Just a minor nit: the above block of code would be better placed after
option argument completions (i.e. the "case $prev" block and $split &&
return 0), otherwise bogus completions are produced for option argument
completions starting with a dash, for example "kcov --pid=-<TAB>"
(guesswork, I don't have kcov installed or available as a package).

kcov is certainly not the only one of our completions having this
problem, we should clean that stuff up sometime (I have it on my local
TODO list).



More information about the Bash-completion-devel mailing list