Merge branch 'tr/test-lint-no-export-assignment-in-shell'
* tr/test-lint-no-export-assignment-in-shell: test-lint: detect 'export FOO=bar' t9902: fix 'test A == B' to use = operator
This commit is contained in:
commit
533a05f63a
@ -21,6 +21,7 @@ while (<>) {
|
||||
/^\s*declare\s+/ and err 'arrays/declare not portable';
|
||||
/^\s*[^#]\s*which\s/ and err 'which is not portable (please use type)';
|
||||
/test\s+[^=]*==/ and err '"test a == b" is not portable (please use =)';
|
||||
/^\s*export\s+[^=]*=/ and err '"export FOO=bar" is not portable (please use FOO=bar && export FOO)';
|
||||
# this resets our $. for each file
|
||||
close ARGV if eof;
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ run_completion ()
|
||||
local -a COMPREPLY _words
|
||||
local _cword
|
||||
_words=( $1 )
|
||||
test "${1: -1}" == ' ' && _words+=('')
|
||||
test "${1: -1}" = ' ' && _words+=('')
|
||||
(( _cword = ${#_words[@]} - 1 ))
|
||||
__git_wrap__git_main && print_comp
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user