mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 14:48:57 +00:00
Handle ``!'' characters when they appear as second and subsequent
parts of an && or || expression. This makes this expression work as expected: if true && ! false; then echo yes; fi
This commit is contained in:
parent
355c6ef4b4
commit
51a9b1c281
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=75155
@ -256,13 +256,16 @@ pipeline() {
|
||||
union node *n1, *pipenode, *notnode;
|
||||
struct nodelist *lp, *prev;
|
||||
int negate = 0;
|
||||
int savecheckkwd = checkkwd;
|
||||
|
||||
TRACE(("pipeline: entered\n"));
|
||||
checkkwd = 2;
|
||||
while (readtoken() == TNOT) {
|
||||
TRACE(("pipeline: TNOT recognized\n"));
|
||||
negate = !negate;
|
||||
}
|
||||
tokpushback++;
|
||||
checkkwd = savecheckkwd;
|
||||
n1 = command();
|
||||
if (readtoken() == TPIPE) {
|
||||
pipenode = (union node *)stalloc(sizeof (struct npipe));
|
||||
|
Loading…
Reference in New Issue
Block a user