Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: local after setopt allexport?
- X-seq: zsh-workers 1936
- From: Peter Stephenson <pws@xxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: local after setopt allexport?
- Date: Fri, 09 Aug 1996 10:49:15 +0200
- In-reply-to: "schaefer@xxxxxxxxxxxxxxxxxxxxxxx"'s message of "Thu, 08 Aug 1996 22:44:52 MET." <960808224452.ZM21431@xxxxxxxxxxxxxxxxxxxxxxx>
schaefer@xxxxxxxxxxxxxxxxxxxxxxx wrote:
> I confess to be curious why:
>
> setopt allexport
> typeset +x FOO=bar
>
> results in FOO being exported, whereas
>
> setopt allexport
> FOO=bar
> typeset +x FOO
>
> results in FOO being local. Does ksh really ignore the `+x' in the
> first example? (I should get pdksh so I can stop asking this stuff,
> but then again, most of the time I don't *want* pdksh.)
It looks like ksh makes FOO local in both cases --- in fact, even
without the +x in the first case. This is just one of many
inconsistencies with typeset which needs a much clearer logic.
Another is that typeset with an existing sufficiently local variable
reports the value, which is confusing in functions. If I had a list
of all the things it should and shouldn't do I might attempt to
rewrite it one day.
--
Peter Stephenson <pws@xxxxxx> Tel: +49 33762 77366
WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77330
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author