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.
master
Sylvain Joubert 2016-08-04 18:59:21 +02:00 committed by Brad King
parent 93b705a396
commit fe7f117ad2
1 changed files with 1 additions and 1 deletions

View File

@ -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
;;