ref: 8ed49e9d5d4475f684636a90ccd92b10c1593b58
parent: d576d2552c6196c2716f6248f83d083dc0b1f16e
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Apr 18 14:20:34 EDT 2020
rc: fix code serialization for PIPEFD (thanks BurnZeZ)
BurnZeZ reported this the other day. It seems like if we have
a pipeline that looks like:
fn foo{cat < <{echo hi}}
then the '<' will get merged in /env/'fn#foo'. This change
fixes pcmd to add a space. It looks to me like this is the
only token that can get merged this way by pcmd.
--- a/sys/src/cmd/rc/pcmd.c
+++ b/sys/src/cmd/rc/pcmd.c
@@ -106,6 +106,7 @@
break;
case PIPEFD:
case REDIR:
+ pchr(f, ' ');
switch(t->rtype){case HERE:
pchr(f, '<');
--
⑨