9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Anthony Martin <ality@pbrane.org>
To: 9front@9front.org
Subject: [9front] Re: /bin/"" use of rc -c instead of eval
Date: Fri, 5 Jul 2024 16:49:30 -0700	[thread overview]
Message-ID: <ZoiGijN5LTEkXSRK@alice> (raw)
In-Reply-To: <134D67B5C9704156217DD4C7B22C18DB@smtp.pobox.com>

Romano <me+unobe@fallglow.com> once said:
> I use " and "" to review previous commands and execute them, and
> I was puzzled when a previous 'cd' command didn't work. I
> suspected it might be perhaps to 'cd' being a built-in, and
> looking at the source code for "" my suspicion was confirmed. The
> last line that executes the command is: rc -c $"_x
>
> Any reason why this isn't using eval instead so that rc built-ins
> work (eval $"_x)

Did you try it? What happened?

Hint: what you seem to want is not

	"" cd.*foo

but
	. <{" cd.*foo}

Cheers,
  Anthony

  parent reply	other threads:[~2024-07-05 23:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-05 22:23 [9front] " Romano
2024-07-05 23:14 ` Stanley Lieber
2024-07-05 23:49 ` Anthony Martin [this message]
2024-07-06  1:48   ` [9front] " Romano
2024-07-06  8:00     ` sirjofri
2024-07-06  9:41       ` Romano
2024-07-06 14:05         ` sirjofri
2024-07-06 14:08         ` sirjofri
2024-07-11  6:02           ` Romano

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=ZoiGijN5LTEkXSRK@alice \
    --to=ality@pbrane.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).