Improve cmake-completion (install doc, ctest -R completion)

This commit is contained in:
Eric NOULARD 2010-08-13 17:11:42 +02:00
parent e41f813d12
commit 1715c96b3c
1 changed files with 12 additions and 0 deletions

View File

@ -16,6 +16,13 @@
#
# The file has been proposed for inclusion in the bash-completion package
# https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312632&group_id=100114
# In the meantime,
# 1) If you want to test bash completion for cmake/cpack/ctest
# just source the current file at bash prompt
# . ./cmake-completion
#
# 2) If you want to install it for good copy this file to
# cp cmake-completion /etc/bash_completion.d/cmake
#
#
@ -153,6 +160,11 @@ _ctest()
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
return 0
;;
-R)
local running=$(for x in `ctest -N 2> /dev/null | grep "^ Test" | cut -d: -f 2`; do echo ${x} ; done )
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
return 0
;;
*)
;;
esac