9front - general discussion about 9front
 help / color / mirror / Atom feed
From: ori@eigenstate.org
To: 9front@9front.org
Subject: rc: accidenatally merged tokens in pcmd
Date: Fri, 17 Apr 2020 17:08:28 -0700	[thread overview]
Message-ID: <A427166CC9206014795D321743A09E25@eigenstate.org> (raw)

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, '<');



             reply	other threads:[~2020-04-18  0:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-18  0:08 ori [this message]
2020-04-18 16:20 ` [9front] " cinap_lenrek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A427166CC9206014795D321743A09E25@eigenstate.org \
    --to=ori@eigenstate.org \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).