Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: The test command



I'm CC'ing this to bug-coreutils with the full expectation that it'll
bounce because I'm not subscribed.

On Sep 12, 11:20am, Dave Yost wrote:
}
} I propose this addition to the age-old test command:

Unlikely.  It breaks backwards compatibility.  "test" is one of those
things that's now SO old, that essentially no changes are allowed. [*]

The meaning of
	test --verbose
is equivalent to
	test --verbose != ''
and there might somewhere be a script that depends upon
	string=--verbose
	test $string
to work correctly.

} The usefulness of this is shown in this example:
} 
}    if ! test --verbose -e "$file" ; then
}      exit $?
}    fi

    zmodload -i zsh/system
    if ! test -e "$file"; then
      syserror >&2
      exit $?
    fi

[*] Zsh sometimes makes exceptions in places where a syntax error would
occur in the older version of the command, but never in places where the
change would alter the semantics of working syntax.



Messages sorted by: Reverse Date, Date, Thread, Author