.bashrc
파일에 bash_completion
을 활성화했습니다. 이제 터미널을 시작할 때마다, 그것은 나에게이 경고 표시 : 추가 정보를 위해새 터미널을 열 때마다 bash_completion에서 구문 오류 또는 경고가 표시되지 않습니까?
bash: [: too many arguments
bash: [: =: unary operator expected
bash: [: =: unary operator expected
bash: [: too many arguments
을,이 명령을 실행 :
$ bash .bashrc
을 그리고 그것은 나에게이 경고 보여
/etc/bash_completion.d/gcc: line 50: [: too many arguments
/etc/bash_completion.d/ifupdown: line 3: [: =: unary operator expected
/etc/bash_completion.d/ifupdown: line 19: [: =: unary operator expected
/etc/bash_completion.d/man: line 3: [: too many arguments
을
라인 50의 /etc/bash_completion.d/gcc
:
[ $USERLAND = GNU -o $UNAME = Cygwin ] && \
여기에 문제가 무엇인지 모르겠습니까? 이러한 경고가 터미널의 시작을 피하는 것을 어떻게 억제합니까?
+++ '[' = GNU -o Linux = Cygwin ']'
/etc/bash_completion.d/gcc: line 50: [: too many arguments
.
.
.
+++ '[' = GNU ']'
/etc/bash_completion.d/ifupdown: line 3: [: =: unary operator expected
+++ '[' = GNU ']'
/etc/bash_completion.d/ifupdown: line 19: [: =: unary operator expected
편집 : 2
출력 bash -x /etc/bash_completion | grep -E 'UNAME|USERLAND'
++ UNAME=Linux
++ UNAME=Linux
++ unset UNAME RELEASE default dirnames filenames have nospace bashdefault plusdirs
의
는 편집 : 애드리안 제안하고 내가 출력에 다음을 발견
나는 bash -xv .bashrc
를 실행
을하기 때문에 중'$ USERLAND' 또는'bash는 -xv'와'$ UNAME'이 비어있는, 디버그 후드 아래에 무슨 일이 일어나고 있는지 확인합니다. 너 무슨 시스템있어? –
@ AdrianFrühwirth, 우분투 12.04를 사용하고 있습니다. 나는 그것을 시도 할 것이다. – udiboy1209
@ AdrianFrühwirth 너무 많은 논쟁이 불평하면'$ USERLAND' 또는'$ UNAME'에 두 단어 이상이 포함될 것을 제안합니다. 나는 그들이 인용되지 않은 것에 놀란다. –