Hi, Here comes an update of the bash completion scripts. All of them now handle the same set of --help-xxx options the handling of --help-manual has been added.
-- Eric
From b201a66ab61643066294d554434829399371f733 Mon Sep 17 00:00:00 2001 From: Eric NOULARD <eric.noul...@gmail.com> Date: Fri, 10 Jun 2016 15:28:05 +0200 Subject: [PATCH] Update bash completion scripts for cmake, cpack & ctest. The modifications are: - add the handling of --help-manual which was missing - make the 3 commands handle the common set of completion for --help-xxxx. --- Auxiliary/bash-completion/cmake | 5 +++++ Auxiliary/bash-completion/cpack | 22 +++++++++++++++++++++- Auxiliary/bash-completion/ctest | 26 ++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) diff --git a/Auxiliary/bash-completion/cmake b/Auxiliary/bash-completion/cmake index 557f243..6997d47 100644 --- a/Auxiliary/bash-completion/cmake +++ b/Auxiliary/bash-completion/cmake @@ -121,6 +121,11 @@ _cmake() grep -v "^cmake version " )' -- "$cur" ) ) return ;; + --help-manual) + COMPREPLY=( $( compgen -W '$( cmake --help-manual-list 2>/dev/null| + grep -v "^cmake version " | sed -e "s/([0-9])$//" )' -- "$cur" ) ) + return + ;; --help-module) COMPREPLY=( $( compgen -W '$( cmake --help-module-list 2>/dev/null| grep -v "^cmake version " )' -- "$cur" ) ) diff --git a/Auxiliary/bash-completion/cpack b/Auxiliary/bash-completion/cpack index 05e0e93..8f14a72 100644 --- a/Auxiliary/bash-completion/cpack +++ b/Auxiliary/bash-completion/cpack @@ -48,7 +48,27 @@ _cpack() grep -v "^cpack version " )' -- "$cur" ) ) return ;; - --help-variable) + --help-manual) + COMPREPLY=( $( compgen -W '$( cpack --help-manual-list 2>/dev/null| + grep -v "^cpack version " | sed -e "s/([0-9])$//" )' -- "$cur" ) ) + return + ;; + --help-module) + COMPREPLY=( $( compgen -W '$( cpack --help-module-list 2>/dev/null| + grep -v "^cpack version " )' -- "$cur" ) ) + return + ;; + --help-policy) + COMPREPLY=( $( compgen -W '$( cpack --help-policies 2>/dev/null | + grep "^ CMP" 2>/dev/null )' -- "$cur" ) ) + return + ;; + --help-property) + COMPREPLY=( $( compgen -W '$( cpack --help-property-list \ + 2>/dev/null | grep -v "^cpack version " )' -- "$cur" ) ) + return + ;; + --help-variable) COMPREPLY=( $( compgen -W '$( cpack --help-variable-list \ 2>/dev/null | grep -v "^cpack version " )' -- "$cur" ) ) return diff --git a/Auxiliary/bash-completion/ctest b/Auxiliary/bash-completion/ctest index 387672a..de8fde1 100644 --- a/Auxiliary/bash-completion/ctest +++ b/Auxiliary/bash-completion/ctest @@ -72,11 +72,37 @@ _ctest() COMPREPLY=( $( compgen -W '0 1' -- "$cur" ) ) return ;; + --help-command) COMPREPLY=( $( compgen -W '$( ctest --help-command-list 2>/dev/null| grep -v "^ctest version " )' -- "$cur" ) ) return ;; + --help-manual) + COMPREPLY=( $( compgen -W '$( ctest --help-manual-list 2>/dev/null| + grep -v "^ctest version " | sed -e "s/([0-9])$//" )' -- "$cur" ) ) + return + ;; + --help-module) + COMPREPLY=( $( compgen -W '$( ctest --help-module-list 2>/dev/null| + grep -v "^ctest version " )' -- "$cur" ) ) + return + ;; + --help-policy) + COMPREPLY=( $( compgen -W '$( ctest --help-policies 2>/dev/null | + grep "^ CMP" 2>/dev/null )' -- "$cur" ) ) + return + ;; + --help-property) + COMPREPLY=( $( compgen -W '$( ctest --help-property-list \ + 2>/dev/null | grep -v "^ctest version " )' -- "$cur" ) ) + return + ;; + --help-variable) + COMPREPLY=( $( compgen -W '$( ctest --help-variable-list \ + 2>/dev/null | grep -v "^ctest version " )' -- "$cur" ) ) + return + ;; esac if [[ "$cur" == -* ]]; then -- 2.8.1
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers