[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 2.0-4-gf604f6c

Igor Murzov e-mail at date.by
Wed Jul 4 21:13:45 UTC 2012


The following commit has been merged in the master branch:
commit f604f6ce5b952e10ea6053445e9f70c2079943b8
Author: Igor Murzov <e-mail at date.by>
Date:   Thu Jul 5 01:01:50 2012 +0400

    kcov: Complete arguments of --limits option.

diff --git a/completions/kcov b/completions/kcov
index e5b2436..86d2d10 100644
--- a/completions/kcov
+++ b/completions/kcov
@@ -19,8 +19,22 @@ _kcov()
             _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
             ;;

-- 
bash-completion



More information about the Bash-completion-commits mailing list