Hi, Please find attached a fix for the completion of the '-E' option.
The 'sed' match was not strong enough and took into account the wrapped description text of long commands. This should now be fixed.
Regards, Sylvain
>From e6312fb56b04ec653fd314df77881b38c1ff7dd0 Mon Sep 17 00:00:00 2001 From: Sylvain Joubert <joubert...@gmail.com> Date: Thu, 4 Aug 2016 18:59:21 +0200 Subject: [PATCH] bash-completion: Fix cmake -E lookup In case of long '<command> <args...>' the description text is wrapped and indented on the next line. Avoid taking these lines into account by explicitly requiring the third character to be a non-space. --- Auxiliary/bash-completion/cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Auxiliary/bash-completion/cmake b/Auxiliary/bash-completion/cmake index 6061129..0a862fa 100644 --- a/Auxiliary/bash-completion/cmake +++ b/Auxiliary/bash-completion/cmake @@ -102,7 +102,7 @@ _cmake() ;; -E) COMPREPLY=( $( compgen -W "$( cmake -E help |& sed -n \ - '/^ /{s|^ \([^ ]\{1,\}\) .*$|\1|;p}' 2>/dev/null )" \ + '/^ [^ ]/{s|^ \([^ ]\{1,\}\) .*$|\1|;p}' 2>/dev/null )" \ -- "$cur" ) ) return ;; -- 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