소스 검색

bash-completion: silent cmake -D lookup

The completion for -D tries to read the cache via 'cmake -LA -N', but this
prints a warning.  Silent the lookup by redirecting this warning to null.
Felix Schwitzer 6 년 전
부모
커밋
64aeb520ca
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      Auxiliary/bash-completion/cmake

+ 2 - 2
Auxiliary/bash-completion/cmake

@@ -76,8 +76,8 @@ _cmake()
                 compopt -o nospace
             else
             # complete variable names
-                COMPREPLY=( $( compgen -W '$( cmake -LA -N | tail -n +2 |
-                    cut -f1 -d: )' -P "$prefix" -- "$cur" ) )
+                COMPREPLY=( $( compgen -W '$( cmake -LA -N 2>/dev/null |
+                    tail -n +2 | cut -f1 -d: )' -P "$prefix" -- "$cur" ) )
                 compopt -o nospace
             fi
             return