Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/bin/sh
Module Name: src
Committed By: kre
Date: Sat May 27 11:19:57 UTC 2017
Modified Files:
src/bin/sh: parser.c sh.1 shell.h var.c
Log Message:
More standard (and saner) implementation of the ! reserved word.
Unless the shell is compiled with the (compilation time) option
BOGUS_NOT_COMMAND (as in CFLAGS+=-DBOGUS_NOT_COMMAND) which it
will not normally be, the ! command (reserved word) will only
be permitted at the start of a pipeline (which includes the
degenerate pipeline with no '|'s in it of course - ie: a simple cmd)
and not in the middle of a pipeline sequence (no "cmd | ! cmd" nonsense.)
If the latter is really required, then "cmd | { ! cmd; }" works as
a standard equivalent.
In POSIX mode, permit only one ! ("! pipeline" is ok. "! ! pipeline" is not).
Again, if needed (and POSIX conformance is wanted) "! { ! pipeline; }"
works as an alternative - and is safer, some shells treat "! ! cmd" as
being identical to "cmd" (this one did until recently.)
To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.129 src/bin/sh/parser.c
cvs rdiff -u -r1.144 -r1.145 src/bin/sh/sh.1
cvs rdiff -u -r1.21 -r1.22 src/bin/sh/shell.h
cvs rdiff -u -r1.54 -r1.55 src/bin/sh/var.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index