Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: more dependencies on emulation
- X-seq: zsh-workers 1709
- From: Zefram <A.Main@xxxxxxxxxxxxxxxxx>
- To: schaefer@xxxxxxx
- Subject: Re: more dependencies on emulation
- Date: Fri, 19 Jul 1996 15:07:27 +0100 (BST)
- Cc: A.Main@xxxxxxxxxxxxxxxxx, zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <9607181518.ZM14255@xxxxxxxxxxxxxxxxxxxxxxx> from "Bart Schaefer" at Jul 18, 96 03:18:39 pm
>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.
In sh, $foo[1] is equivalent to ${foo}[1]. Consequently "emulate sh"
will have to affect this part of the syntax. The other aspects of
arrays don't need to be affected by sh emulation, true, but it seems
rather stupid to make this distinction.
>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,
This patch doesn't affect that aspect of behaviour -- "emulate ksh" and
"emulate zsh" will affect this expansion behaviour exactly as they did
before. It only affects behaviour when the new option is individually
changed.
> ~$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.
Maybe. The documentation phrases things in terms of the SH_FILE_SUBST
option, which is independent of IGNORE_BRACES. A note about
IGNORE_BRACES would certainly be reasonable, but it's not essential.
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author