> there is a ']' missing in test's man page:
>
> SYNOPSIS
> ~ test EXPRESSION
> ~ [ EXPRESSION ]
> ~ [ OPTION
>
Nope, that is intentional.
Compare:
$ /bin/test --help
0 # Yep, --help is a non-zero length string
$ /bin/[ --help ]; echo $?
0 # Yep, --help is a non-zero length string
$ /bin/[ --help; echo $?
Usage: test EXPRESSION
...
0 # Oh, you wanted some help!
The only options supported by the source code that gets compiled into
both test and [ are the standard --help and --version, and those options
are only supported when the program name is spelled [ and there
is nothing else on the command line, so as to comply with POSIX.
--
Eric Blake