From: Alan Watson <alan@oldp.astro.wisc.edu>
To: haahr@mv.us.adobe.com (Paul Haahr)
Cc: rc@hawkwind.utcs.toronto.edu
Subject: Re: redirection and built-ins
Date: Mon, 7 Jun 1993 13:10:16 -0400 [thread overview]
Message-ID: <9306071710.AA08381@oldp.astro.wisc.edu> (raw)
Paul writes:
> it's inappropriate because rc already has a perfectly good
> mechanism for setting variables to the output of commands: backquotes.
> why is that not enough? what functionality does that lack?
Oh, the ability to encapsulate the process in a function (yes, I know
that in es one could pass a program fragment, but this is the rc-list
after all), and an easy way to get at the return value (yes, I know
that may be fixed in a later version, but I'd still rather hide the
grubby details in a function).
> what does this mean? (``functionally-implemented''? that it works?
> that it doesn't have side effects?)
It means `implemented as a function'.
> the mechanism we came up with for doing this [redirection on
> built-ins without forking] in
> es could be applied to rc just fine, but it seems like a lot of
> work for very little payoff.
Fine. I'm prepared to accept that answer; as I said in my original
message, I'm only interested in exploring the possibilities, and I am
not campaigning for either of these changes. I'm not concerned about
the performance aspects, only the functionality.
> what should happen if the command is
> exit 1 | exit 2 | exit 3
> ?
There will always be pathological cases: even now, if you have an exit
in a function and run it with and without redirection, different things
happen. I haven't heard of anyone losing any sleep about it.
next reply other threads:[~1993-06-07 17:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-06-07 17:10 Alan Watson [this message]
-- strict thread matches above, loose matches on Subject: below --
1993-06-07 15:24 Paul Haahr
1993-06-07 5:23 Alan Watson
1993-06-07 0:32 Paul Haahr
1993-06-05 18:59 Alan Watson
1993-06-05 18:45 Paul Haahr
1993-06-05 18:38 Alan Watson
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=9306071710.AA08381@oldp.astro.wisc.edu \
--to=alan@oldp.astro.wisc.edu \
--cc=haahr@mv.us.adobe.com \
--cc=rc@hawkwind.utcs.toronto.edu \
/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).