diff options
author | Igor Murzov <e-mail@date.by> | 2011-06-06 01:06:25 +0400 |
---|---|---|
committer | Igor Murzov <e-mail@date.by> | 2011-06-06 01:06:25 +0400 |
commit | a0834d3bf49864f9e04fe07134ee6dc72b8bbc24 (patch) | |
tree | 38f5cc4127a5e1679c0f71b3da4141d6276e915e /completions/kcov | |
parent | 3ac922e4a6d8d773f5e7a4c42ee86b4de3e0e3a2 (diff) | |
download | bash-completion-a0834d3bf49864f9e04fe07134ee6dc72b8bbc24.tar.gz |
kcov: New completion
Diffstat (limited to 'completions/kcov')
-rw-r--r-- | completions/kcov | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/completions/kcov b/completions/kcov new file mode 100644 index 00000000..d330a480 --- /dev/null +++ b/completions/kcov @@ -0,0 +1,44 @@ +have kcov || return + +_kcov() +{ + local cur prev words cword split + _init_completion -s || return + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' -- "$cur" ) ) + [[ $COMPREPLY == *= ]] && compopt -o nospace + return 0 + fi + + case "$prev" in + --pid|-p) + _pids + return 0 + ;; + --sort-type|-s) + COMPREPLY=( $( compgen -W 'f p' -- "$cur" ) ) + return 0 + ;; + --include-path|--exclude-path) + _filedir + return 0 + ;; + --limits|-l|--title|-t|--include-pattern|--exclude-pattern) + # argument required but no completions available + return 0 + ;; + esac + + $split && return 0 + + _filedir +} && complete -F _kcov kcov + +# Local variables: +# mode: shell-script +# sh-basic-offset: 4 +# sh-indent-comment: t +# indent-tabs-mode: nil +# End: +# ex: ts=4 sw=4 et filetype=sh |