From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: PATCH: functions with redirections
Date: Tue, 30 Sep 2014 09:48:13 +0100 [thread overview]
Message-ID: <20140930094813.22965438@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <140929180257.ZM7637@torch.brasslantern.com>
On Mon, 29 Sep 2014 18:02:57 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Sep 29, 1:53pm, Bart Schaefer wrote:
> }
> } foo() { echo foo; } >&3
> } foo 3>&2
>
> Tried this now; happily it works the same as bash.
It works by appending the list from the function definition to the list
from the command line, so the effect is "3>&2 >&3" as you expect.
Should probably add a test for it --- it's slightly different code from
the normal case.
$functions[foo] output will need a special case. I'll look at it. I
don't think there's anything much to be gained by extending the special
case elsewhere since it's already broadly working like other shells, and
$functions is an odd one out there.
pws
next prev parent reply other threads:[~2014-09-30 8:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-29 19:52 Peter Stephenson
2014-09-29 20:27 ` Peter Stephenson
2014-09-29 20:53 ` Bart Schaefer
2014-09-29 21:37 ` Bart Schaefer
2014-09-30 4:51 ` Mikael Magnusson
2014-10-01 19:17 ` Peter Stephenson
2014-10-02 4:07 ` Bart Schaefer
2014-10-02 8:35 ` Peter Stephenson
2014-10-02 14:55 ` Peter Stephenson
2014-10-02 15:54 ` Bart Schaefer
2014-10-02 15:56 ` Bart Schaefer
2014-10-02 16:03 ` Peter Stephenson
2014-09-30 1:02 ` Bart Schaefer
2014-09-30 8:48 ` Peter Stephenson [this message]
2014-09-30 11:52 ` Peter Stephenson
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=20140930094813.22965438@pwslap01u.europe.root.pri \
--to=p.stephenson@samsung.com \
--cc=zsh-workers@zsh.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
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).