diff options
Diffstat (limited to 'completions/kcov')
-rw-r--r-- | completions/kcov | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/completions/kcov b/completions/kcov new file mode 100644 index 00000000..e0f37fdb --- /dev/null +++ b/completions/kcov @@ -0,0 +1,39 @@ +# kcov completion -*- shell-script -*- + +_kcov() +{ + local cur prev words cword split + _init_completion -s || return + + case "$prev" in + --pid|-p) + _pids + return 0 + ;; + --sort-type|-s) + COMPREPLY=( $( compgen -W 'filename percentage' -- "$cur" ) ) + return 0 + ;; + --include-path|--exclude-path) + _filedir + return 0 + ;; + --limits|-l|--title|-t|--include-pattern|--exclude-pattern|\ + --path-strip-level) + # argument required but no completions available + return 0 + ;; + esac + + $split && return 0 + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' -- "$cur" ) ) + [[ $COMPREPLY == *= ]] && compopt -o nospace + return 0 + fi + + _filedir +} && complete -F _kcov kcov + +# ex: ts=4 sw=4 et filetype=sh |