diff options
author | Sylvain Joubert <joubert.sy@gmail.com> | 2016-08-04 16:59:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-08-05 12:54:09 (GMT) |
commit | fe7f117ad22c1f2884c47cb961ea33f1c88206a4 (patch) | |
tree | 777d7ceda7772a09aff33145b0f560c4babf2656 | |
parent | 93b705a396c23f771ba203efb6f2f4934ae027b7 (diff) | |
download | CMake-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.
-rw-r--r-- | Auxiliary/bash-completion/cmake | 2 |
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 ;; |