From 1715c96b3c5862cb7b566a224c66e16d15bfa466 Mon Sep 17 00:00:00 2001 From: Eric NOULARD Date: Fri, 13 Aug 2010 17:11:42 +0200 Subject: [PATCH] Improve cmake-completion (install doc, ctest -R completion) --- Docs/cmake-completion | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Docs/cmake-completion b/Docs/cmake-completion index ab6272a77..011f3fa93 100644 --- a/Docs/cmake-completion +++ b/Docs/cmake-completion @@ -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