[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Debian Bash bug #173273 (test -w with no arguments isn't an error)
From: |
Dan Jacobson |
Subject: |
Re: Debian Bash bug #173273 (test -w with no arguments isn't an error) |
Date: |
19 Dec 2002 05:51:09 +0800 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
>>>>> "Chet" == Chet Ramey <address@hidden> writes:
Chet> I don't understand it. Do people deliberately ignore the relevant
sections
Chet> of the documentation so they can claim it doesn't cover something?
Chet> This is from the man page, in the section describing `test':
OK, but you had better add something about it to the "help test" output.
Chet> test and [ evaluate conditional expressions using a
Chet> set of rules based on the number of arguments.
Chet> 0 arguments
Chet> The expression is false.
Chet> 1 argument
Chet> The expression is true if and only if the
Chet> argument is not null.
OK, but you must admit that without something about this being
mentioned in the 'help' output, the user assumes it is like the other
99.9% of the commands. I mean what if the rm command was all OK
about any single switch with no arg being not an error...
anyway, take a 2nd look at the help output. it sure needs a note about
any single unnil arg returning true.
And the GNU test(1) man and Info pages don't mention any of that.
That is surely their bug.
Chet> 2 arguments
Chet> If the first argument is !, the expression
Chet> is true if and only if the second argument
Chet> is null. If the first argument is one of
Chet> the unary conditional operators listed above
Chet> under CONDITIONAL EXPRESSIONS, the expres-
Chet> sion is true if the unary test is true. If
Chet> the first argument is not a valid unary con-
Chet> ditional operator, the expression is false.
Chet> [...and so on...]
Chet> How does this fail to describe the case where test is given a single
Chet> argument of `-w'?
well, only one [bash man] of the 4 references [bash man, bash help,
man test, info test] one would check mentions this.
Chet> This is explicitly covered in the FAQ, question E1.
but it is more important the meanings of -w -f -d etc. so it should be
mentioned first everywhere.
--
http://jidanni.org/ Taiwan(04)25854780
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Debian Bash bug #173273 (test -w with no arguments isn't an error),
Dan Jacobson <=