zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Zefram <A.Main@dcs.warwick.ac.uk>,
	zsh-workers@math.gatech.edu (Z Shell workers mailing list)
Subject: Re: more dependencies on emulation
Date: Thu, 18 Jul 1996 15:18:39 -0700	[thread overview]
Message-ID: <9607181518.ZM14255@candle.brasslantern.com> (raw)
In-Reply-To: Zefram <A.Main@dcs.warwick.ac.uk> "more dependencies on emulation" (Jul 18,  3:23pm)

On Jul 18,  3:23pm, Zefram wrote:
> Subject: more dependencies on emulation
> -----BEGIN PGP SIGNED MESSAGE-----
> 
> There are two distinct uses of emulation addressed here.  One affects
> the position of filename expansion in the order of expansion; I add a
> new option, SH_FILE_SUBST, to control this.  [...]
> 
> The second use of emulation is to control whether the $foo[2] subscript
> placement will work; sh and ksh don't recognise it as a subscript.
> The patch makes this be controlled by the KSH_ARRAYS option, as it should
> have been all along.  The KSH_ARRAYS option is also changed to be set
> by default when emulating sh, which was previously not essential.

[....]

>       + \fBSH_FILE_SUBST\fP
>       + If this option is unset, it is performed
>       + .I after
>       + brace expansion, so things like ``~$USERNAME'' ``~{pfalstad,rc}'' will work.

Two minor nits:

If zsh were really emulating sh, arrays wouldn't work at all.  So it's a
bit dubious to force ksh syntax only, given that it affects the indices
as well as the syntax.

I don't have a ksh to try this, but ~{pfalstad,rc} works fine in Bash
(that is, the ~ is expanded), even though ~$USER doesn't expand tilde.
In zsh's ksh emulation mode with this patch applied, ~$USER works, but
~{pfalstad,rc} fails unless IGNORE_BRACES is also unset.  There doesn't
seem to be any way to get the Bash behavior (maybe not important), but
the manual should probably mention the IGNORE_BRACES requirement if it
is going to use ~{...} in this example.



  reply	other threads:[~1996-07-18 22:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-18 14:23 Zefram
1996-07-18 22:18 ` Bart Schaefer [this message]
1996-07-19  1:34   ` Zoltan Hidvegi
1996-07-19  2:59     ` Bart Schaefer
1996-07-19 14:21       ` Zefram
1996-07-19 14:17     ` Zefram
1996-07-19 14:07   ` Zefram
1996-07-19  0:12 ` Zoltan Hidvegi
1996-07-19  2:44   ` Bart Schaefer
1996-07-19 14:26     ` Zefram
1996-07-19 18:14       ` Bart Schaefer

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=9607181518.ZM14255@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=A.Main@dcs.warwick.ac.uk \
    --cc=schaefer@nbn.com \
    --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).