summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Murzov <e-mail@date.by>2011-07-17 18:14:33 +0400
committerIgor Murzov <e-mail@date.by>2011-07-18 02:01:59 +0400
commit002a5a45531aed3fd5d70119df85361e52827030 (patch)
tree1b733370af0f969d3b42305b0541ad8006c3eb8c
parentb68cc0057f605fefcba540fef993ec72a4ee2407 (diff)
downloadbash-completion-002a5a45531aed3fd5d70119df85361e52827030.tar.gz
kcov: Add --path-strip-level option (added in kcov-v7)
Also provide more meaningful completions for --sort-type option. And improve test.
-rw-r--r--completions/kcov5
-rw-r--r--test/lib/completions/kcov.exp6
2 files changed, 5 insertions, 6 deletions
diff --git a/completions/kcov b/completions/kcov
index 3bad12d8..de421ff9 100644
--- a/completions/kcov
+++ b/completions/kcov
@@ -11,14 +11,15 @@ _kcov()
return 0
;;
--sort-type|-s)
- COMPREPLY=( $( compgen -W 'f p' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W 'filename percentage' -- "$cur" ) )
return 0
;;
--include-path|--exclude-path)
_filedir
return 0
;;
- --limits|-l|--title|-t|--include-pattern|--exclude-pattern)
+ --limits|-l|--title|-t|--include-pattern|--exclude-pattern|\
+ --path-strip-level)
# argument required but no completions available
return 0
;;
diff --git a/test/lib/completions/kcov.exp b/test/lib/completions/kcov.exp
index f2a50318..c39f53e7 100644
--- a/test/lib/completions/kcov.exp
+++ b/test/lib/completions/kcov.exp
@@ -17,10 +17,8 @@ assert_complete_any "kcov "
sync_after_int
-set test "--<TAB> should complete all long options"
-set options [list --help --pid= --sort-type= --limits= --title= --include-path=\
- --exclude-path= --include-pattern= --exclude-pattern=]
-assert_complete $options "kcov --" $test
+set test "--exclude-patter<TAB> should complete \"--exclude-pattern=\""
+assert_complete "--exclude-pattern=" "kcov --exclude-patter" $test -nospace
sync_after_int