zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <A.Main@dcs.warwick.ac.uk>
To: hzoli@cs.elte.hu (Zoltan Hidvegi)
Cc: A.Main@dcs.warwick.ac.uk, zsh-workers@math.gatech.edu
Subject: Re: Globbing in redirections
Date: Thu, 6 Jun 1996 17:36:37 +0100 (BST)	[thread overview]
Message-ID: <27406.199606061636@granite.dcs.warwick.ac.uk> (raw)
In-Reply-To: <199606061625.SAA00981@bolyai.cs.elte.hu> from "Zoltan Hidvegi" at Jun 6, 96 06:25:23 pm

>No, that's a different problem.  In zsh filename expansion is performed
>after most other substitutions while POSIX says that it must be the first
>expansion which must be done before $ susbstitutions.  In zsh I can use
>
>USER=hzoli ; echo ~$USER
>
>but this does not work in a POSIX compilant shell.  I'll move filename
>expansion before the other substitutions if zsh is invoked as sh/ksh.  Or
>maybe an option should control this?  I personally think that the best
>would be to do filename expansions first even if zsh is invoked as zsh but
>I'm sure that it will break some scripts.  Does anyone have such a script?

I don't actually have a script that does this, but it's very nice
behaviour, and I do use it from time to time.  I think we should have
another option for this, which would have options
OPT_EMULATE|OPT_BOURNE.  Note that zsh actually follows csh behaviour,
so this really should be OPT_BOURNE and not OPT_NONZSH.  (If you've
never heard of these options, you'll need to check the patch in article
1275.)

However, my original point stands.  ksh doesn't do brace expansion in
redirections.  We need to split up prefork() somewhere -- is there
another function that would be more appropriate to use in this case?
We need all expansions except for brace expansion and globbing, but
prefork() does everything except globbing.

-zefram



  reply	other threads:[~1996-06-06 16:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-06 14:54 Zefram
1996-06-06 16:25 ` Zoltan Hidvegi
1996-06-06 16:36   ` Zefram [this message]
1996-06-06 16:48     ` Zoltan Hidvegi

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=27406.199606061636@granite.dcs.warwick.ac.uk \
    --to=a.main@dcs.warwick.ac.uk \
    --cc=hzoli@cs.elte.hu \
    --cc=zsh-workers@math.gatech.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.
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).