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
@ -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