diff options
Diffstat (limited to 'completions/kcov')
-rw-r--r-- | completions/kcov | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/completions/kcov b/completions/kcov index ebbd803c..86d2d10c 100644 --- a/completions/kcov +++ b/completions/kcov @@ -11,15 +11,30 @@ _kcov() return ;; --sort-type|-s) - COMPREPLY=( $( compgen -W 'filename percentage' -- "$cur" ) ) + COMPREPLY=( $( compgen -W 'filename percentage lines uncovered' \ + -- "$cur" ) ) return ;; --include-path|--exclude-path) _filedir return ;; - --limits|-l|--title|-t|--include-pattern|--exclude-pattern|\ - --path-strip-level) + --limits|-l) + split=false + if [[ "$cur" == ?*,* ]]; then + prev="${cur%,*}" + cur="${cur##*,}" + split=true + fi + COMPREPLY=( $( compgen -W "{0..100}" -- "$cur" ) ) + if $split; then + COMPREPLY=( ${COMPREPLY[@]/#/"$prev,"} ) + else + compopt -o nospace + fi + return + ;; + --title|-t|--include-pattern|--exclude-pattern|--path-strip-level) # argument required but no completions available return ;; |