mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-30 07:10:58 +02:00
fix parsing of `time' without a command (12337)
This commit is contained in:
parent
ea8d99e102
commit
6585bea1fb
2 changed files with 11 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2000-07-21 Sven Wischnowsky <wischnow@zsh.org>
|
||||||
|
|
||||||
|
* 12337: Src/parse.c: fix parsing of `time' without a command
|
||||||
|
|
||||||
2000-07-20 Wayne Davison <wayned@users.sourceforge.net>
|
2000-07-20 Wayne Davison <wayned@users.sourceforge.net>
|
||||||
|
|
||||||
* unposted: tweaked a function name in hist.c for Sven.
|
* unposted: tweaked a function name in hist.c for Sven.
|
||||||
|
|
10
Src/parse.c
10
Src/parse.c
|
@ -1389,9 +1389,13 @@ par_time(void)
|
||||||
|
|
||||||
p = ecadd(0);
|
p = ecadd(0);
|
||||||
ecadd(0);
|
ecadd(0);
|
||||||
f = par_sublist2(&c);
|
if ((f = par_sublist2(&c)) < 0) {
|
||||||
ecbuf[p] = WCB_TIMED((p + 1 == ecused) ? WC_TIMED_EMPTY : WC_TIMED_PIPE);
|
ecused--;
|
||||||
set_sublist_code(p + 1, WC_SUBLIST_END, f, ecused - 2 - p, c);
|
ecbuf[p] = WCB_TIMED(WC_TIMED_EMPTY);
|
||||||
|
} else {
|
||||||
|
ecbuf[p] = WCB_TIMED(WC_TIMED_PIPE);
|
||||||
|
set_sublist_code(p + 1, WC_SUBLIST_END, f, ecused - 2 - p, c);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue