9front - general discussion about 9front
 help / color / mirror / Atom feed
* rc: accidenatally merged tokens in pcmd
@ 2020-04-18  0:08 ori
  2020-04-18 16:20 ` [9front] " cinap_lenrek
  0 siblings, 1 reply; 2+ messages in thread
From: ori @ 2020-04-18  0:08 UTC (permalink / raw)
  To: 9front

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, but I'd
appreciate someone else taking a look for missed cases:

diff -r 627fc39e459f sys/src/cmd/rc/pcmd.c
--- a/sys/src/cmd/rc/pcmd.c	Fri Apr 17 19:18:28 2020 +0200
+++ b/sys/src/cmd/rc/pcmd.c	Fri Apr 17 17:06:25 2020 -0700
@@ -106,6 +106,7 @@
 		break;
 	case PIPEFD:
 	case REDIR:
+		pchr(f, ' ');
 		switch(t->rtype){
 		case HERE:
 			pchr(f, '<');



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9front] rc: accidenatally merged tokens in pcmd
  2020-04-18  0:08 rc: accidenatally merged tokens in pcmd ori
@ 2020-04-18 16:20 ` cinap_lenrek
  0 siblings, 0 replies; 2+ messages in thread
From: cinap_lenrek @ 2020-04-18 16:20 UTC (permalink / raw)
  To: 9front

applied.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-18 16:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-18  0:08 rc: accidenatally merged tokens in pcmd ori
2020-04-18 16:20 ` [9front] " cinap_lenrek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).