summaryrefslogtreecommitdiff
path: root/Auxiliary/bash-completion
diff options
context:
space:
mode:
authorSylvain Joubert <joubert.sy@gmail.com>2014-09-03 20:26:17 +0200
committerBrad King <brad.king@kitware.com>2014-09-03 14:56:13 -0400
commit2603e128818e187a11db3c52a0d6777e58d2d4d9 (patch)
treeb1e968854ac9d965b442a325aff56ed2ee92b886 /Auxiliary/bash-completion
parentfb8acb74e83a591c1231c4a07c221f4392f4c0be (diff)
downloadcmake-2603e128818e187a11db3c52a0d6777e58d2d4d9.tar.gz
bash-completion: Complete 'ctest' label names
Diffstat (limited to 'Auxiliary/bash-completion')
-rw-r--r--Auxiliary/bash-completion/ctest8
1 files changed, 6 insertions, 2 deletions
diff --git a/Auxiliary/bash-completion/ctest b/Auxiliary/bash-completion/ctest
index 25cb998413..327e12c599 100644
--- a/Auxiliary/bash-completion/ctest
+++ b/Auxiliary/bash-completion/ctest
@@ -19,8 +19,12 @@ _ctest()
_filedir
return
;;
- -L|--label-regex|-LE|--label-exclude|--track|-I|--tests-information|\
- --max-width|--timeout|--stop-time)
+ -L|--label-regex|-LE|--label-exclude)
+ COMPREPLY=( $( compgen -W '$( ctest --print-labels 2>/dev/null |
+ grep "^ " 2>/dev/null | cut -d" " -f 3 )' -- "$cur" ) )
+ return
+ ;;
+ --track|-I|--tests-information|--max-width|--timeout|--stop-time)
# argument required but no completions available
return
;;