summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorstefanf <stefanf@FreeBSD.org>2009-04-13 19:10:56 +0000
committerstefanf <stefanf@FreeBSD.org>2009-04-13 19:10:56 +0000
commit2b5158008fcd04e5523c612d41aa242e48bfa872 (patch)
tree560bf064c01d2d605e15cec614943dd9082cb2ef /bin
parentdfd11f0658eea0aa87d790636d76c3a9e0b5a014 (diff)
downloadFreeBSD-src-2b5158008fcd04e5523c612d41aa242e48bfa872.zip
FreeBSD-src-2b5158008fcd04e5523c612d41aa242e48bfa872.tar.gz
Parse 'cmd1 && ! cmd2 | cmd3' correctly, the bang should apply to the entire
pipeline cmd2 | cmd3 and not just cmd2. PR: 130298 Submitted by: Jilles Tjoelker
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/parser.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/sh/parser.c b/bin/sh/parser.c
index 86f50fc..eb7501e 100644
--- a/bin/sh/parser.c
+++ b/bin/sh/parser.c
@@ -250,6 +250,7 @@ pipeline(void)
int negate;
negate = 0;
+ checkkwd = 2;
TRACE(("pipeline: entered\n"));
while (readtoken() == TNOT)
negate = !negate;
OpenPOWER on IntegriCloud