Tests with more than 4 arguments are explicitely not supported by POSIX
(unspecified result).
Here is a example that shows that the first test may fail unexpectedly
(although the case is improbable to cause any real problems) using dash
on Debian; the message "sh: 1: [: -a: unexpected operator" is printed
and the rror code 2 is returned:
BASH_VERSION='=' PS1=x BASH_COMPLETION_COMPAT_DIR= \
dash -c '[ -n "$BASH_VERSION" -a -n "$PS1" -a -z
"$BASH_COMPLETION_COMPAT_DIR" ]'
One should be very cautious when writing profile files that may be
sourced by any (even non Debian-packaged) shells.
Regards
_______________________________________________
Bash-completion-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-devel