* src/test.c (unary_operator): Remove case 'a'.
(test_unop): Likewise.
* NEWS (Changes in behavior): Document the change.
Discussed at https://bugs.gnu.org/33097
approach is still used in situations where hard links to directories
are allowed (e.g., NetBSD when superuser).
+** Changes in behavior
+
+ 'test -a FILE' is not supported anymore. Long ago, there were concerns about
+ the high probability of humans confusing the -a primary with the -a binary
+ operator, so POSIX changed this to 'test -e FILE'. Scripts using it were
+ already broken and non-portable; the -a unary operator was never documented.
+
** New features
id now supports specifying multiple users.
pos right past it. This means that pos - 1 is the location of the
argument. */
- case 'a': /* file exists in the file system? */
- case 'e':
+ case 'e': /* file exists in the file system? */
unary_advance ();
return stat (argv[pos - 1], &stat_buf) == 0;
switch (op[1])
{
- case 'a': case 'b': case 'c': case 'd': case 'e':
+ case 'b': case 'c': case 'd': case 'e':
case 'f': case 'g': case 'h': case 'k': case 'n':
case 'o': case 'p': case 'r': case 's': case 't':
case 'u': case 'w': case 'x': case 'z':