From 94bd7700aa616590ea7cedbe68c6b26f36b4231d Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sat, 18 Apr 2020 18:20:34 +0200 Subject: 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. --- sys/src/cmd/rc/pcmd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/src/cmd/rc/pcmd.c b/sys/src/cmd/rc/pcmd.c index 889892370..51370ac23 100644 --- a/sys/src/cmd/rc/pcmd.c +++ b/sys/src/cmd/rc/pcmd.c @@ -106,6 +106,7 @@ pcmd(io *f, tree *t) break; case PIPEFD: case REDIR: + pchr(f, ' '); switch(t->rtype){ case HERE: pchr(f, '<'); -- cgit v1.2.3