Explorar o código

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.
Sylvain Joubert %!s(int64=9) %!d(string=hai) anos
pai
achega
fe7f117ad2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Auxiliary/bash-completion/cmake

+ 1 - 1
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
             ;;