bash-custom-action/bash-4.0.10-bar-and-piping.patch

30 lines
784 B
Diff

|> On Wed, Mar 11, 2009 at 09:50:18PM -0400, Matt
|> > rm 2>&1 | grep --color op
|> > rm |& grep --color op
|> >
|> > Notice that they are behaving differently.
|>
|> Confirmed in 4.0.0 and 4.0.10:
|
|Interesting. Only for non-builtin simple commands and some shell functions.
|The attached patch fixes it for me.
|
|Chet
|
*** parse.y 2009-03-09 10:27:05.000000000 -0400
--- parse.y 2009-03-12 09:02:31.000000000 -0400
***************
*** 1123,1127 ****
REDIRECT *r;
! tc = $1;
rd.dest = 1;
r = make_redirection (2, r_duplicating_output, rd);
--- 1123,1127 ----
REDIRECT *r;
! tc = $1->type == cm_simple ? $1->value.Simple : $1;
rd.dest = 1;
r = make_redirection (2, r_duplicating_output, rd);