summaryrefslogtreecommitdiffstats
path: root/Auxiliary
diff options
context:
space:
mode:
authorSylvain Joubert <joubert.sy@gmail.com>2016-08-04 16:59:21 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-05 12:54:09 (GMT)
commitfe7f117ad22c1f2884c47cb961ea33f1c88206a4 (patch)
tree777d7ceda7772a09aff33145b0f560c4babf2656 /Auxiliary
parent93b705a396c23f771ba203efb6f2f4934ae027b7 (diff)
downloadCMake-fe7f117ad22c1f2884c47cb961ea33f1c88206a4.zip
CMake-fe7f117ad22c1f2884c47cb961ea33f1c88206a4.tar.gz
CMake-fe7f117ad22c1f2884c47cb961ea33f1c88206a4.tar.bz2
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.
Diffstat (limited to 'Auxiliary')
-rw-r--r--Auxiliary/bash-completion/cmake2
1 files changed, 1 insertions, 1 deletions
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
;;