summaryrefslogtreecommitdiff
path: root/Auxiliary
diff options
context:
space:
mode:
authorSylvain Joubert <joubert.sy@gmail.com>2016-08-04 18:59:21 +0200
committerBrad King <brad.king@kitware.com>2016-08-05 08:54:09 -0400
commitfe7f117ad22c1f2884c47cb961ea33f1c88206a4 (patch)
tree777d7ceda7772a09aff33145b0f560c4babf2656 /Auxiliary
parent93b705a396c23f771ba203efb6f2f4934ae027b7 (diff)
downloadcmake-fe7f117ad22c1f2884c47cb961ea33f1c88206a4.tar.gz
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 60611296ec..0a862fa079 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
;;