浏览代码

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 9 年之前
父节点
当前提交
fe7f117ad2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Auxiliary/bash-completion/cmake

+ 1 - 1
Auxiliary/bash-completion/cmake

@@ -102,7 +102,7 @@ _cmake()
             ;;
             ;;
         -E)
         -E)
             COMPREPLY=( $( compgen -W "$( cmake -E help |& sed -n \
             COMPREPLY=( $( compgen -W "$( cmake -E help |& sed -n \
-                '/^  /{s|^  \([^ ]\{1,\}\) .*$|\1|;p}' 2>/dev/null )" \
+                '/^  [^ ]/{s|^  \([^ ]\{1,\}\) .*$|\1|;p}' 2>/dev/null )" \
                 -- "$cur" ) )
                 -- "$cur" ) )
             return
             return
             ;;
             ;;