From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: special/readonly variables in sh emulation
Date: Mon, 18 Mar 2002 17:43:53 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.44.0203181732090.19248-100000@ns1.sodaware.com> (raw)
In-Reply-To: <20020318154119.GA11181@logica.com>
On Mon, 18 Mar 2002, Oliver Kiddle wrote:
> We perhaps ought to rethink the status of any special variables
> in sh emulation mode. Especially those which are autoloaded out of
> places like zsh/parameter. Any ideas on how to solve this?
My suggestion would be simply to disable module autoloading entirely when
in sh emulation mode (and maybe ksh too). A sh/ksh script can't possibly
be expecting a dynamically loaded module, and "compinit" et al. can load
anything they explicitly need.
A slightly less drastic approach might be to disable autoloading only for
non-interactive sh emulation.
On Mon, 18 Mar 2002, Peter Stephenson wrote:
> Another is to shift this sort of parameter into a namespace, as we've
> been planning for a long time. I think Sven had a way of doing this
> simply by allowing dots in parameter names --- it wasn't a fully
> featured namespace implementation, but it might be close enough to allow
> us to go over to that if anybody had the time to write it.
I've fooled around with this a bit. The problem is that you have to allow
the dots only inside ${...}, because lots of things break if $file.ext is
interpreted as ${file.ext} rather than ${file}.ext. This is a little
tricky to acheive, because there'd need to be different typtab[] flags for
lexing inside braces v. outside.
On Mon, 18 Mar 2002, Oliver Kiddle wrote:
> Compound variables could be implemented better by being like
> associative arrays - the parent is a hash table of the elements the
> only difference being the elements can be any type, and the syntax is
> different. This alone wouldn't be hard to add onto the existing
> parameter code.
In fact, I deliberately used full parameter hash tables for the
associative array implementation precisely so they could be extended in
the future to support elements of any type. What's needed is a sensible
reference and assignment syntax.
> Also, am I right that we *need* a=() to assign an empty array?
No; `set -A a' will do it.
next prev parent reply other threads:[~2002-03-19 1:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-18 12:56 Oliver Kiddle
2002-03-18 14:07 ` Peter Stephenson
2002-03-18 15:41 ` Oliver Kiddle
2002-03-19 1:43 ` Bart Schaefer [this message]
2002-03-20 12:55 ` Oliver Kiddle
2002-03-20 13:53 ` Peter Stephenson
2002-03-20 17:41 ` Oliver Kiddle
2002-03-26 11:09 ` Oliver Kiddle
2002-03-26 16:55 ` Bart Schaefer
2002-03-19 11:27 ` Peter Stephenson
2002-04-03 14:57 Oliver Kiddle
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=Pine.LNX.4.44.0203181732090.19248-100000@ns1.sodaware.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@sunsite.dk \
/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).