[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: plain test(1) with no arguments is not documented
From: |
Dan Jacobson |
Subject: |
Re: plain test(1) with no arguments is not documented |
Date: |
Thu, 09 Sep 2004 23:50:54 +0800 |
>> And, document plain
>> $ test -n
>> which acts differently than plain
>> $ test
Paul> That's already documented, as "test STRING". -n is the STRING here.
The perfect "gotcha".
Paul> The details are in the manual: it's too much to put into the usage
Paul> string.
Perhaps put it here
Besides the options below, a single argument is also allowed: `test'
returns true if the argument is not null. The argument can be any
string, including strings like `-d', `-1', `--', `--help', and
`--version' that most other programs would treat as options.
+ E.g., using test -n STRING with no STRING causes the -n itself to
+ become the STRING.
That ought to hammer it home.
Paul> The recursion is essential, no? Sounds like more a matter of taste.
Well, with
$ help test
one can use each line as they appear on the screen.
But with
$ man test
one has to read many lines down first.
Imagine a school teacher who doesn't define whole numbers before
discussing complex numbers. "Never mind, I'll define them at the end."
Paul> My copy of Bash doesn't document the recursion at all, even though it
Paul> works.
It's rightly at the bottom of
$ help test