From: Andrej Borsenkow <borsenkow.msk@sni.de>
To: Zsh workers mailing list <zsh-workers@math.gatech.edu>
Subject: Small problem with typeset -U.
Date: Fri, 12 Jul 1996 17:01:17 +0400 (MOW) [thread overview]
Message-ID: <Pine.SV4.3.94.960712165030.23028C-100000@itsrm1> (raw)
Hi!
A little problem with mirror parameters (like path and PATH) and typeset
-U command.
If I set -U option for one of pair of mirrored parameters, it is not set
for other. Thus, e.g.
typeset -U path
PATH=$PATH:~/bin:~/bin
still results in ~/bin being in path/PATH two times. The same holds also
if I set -U for path and try to change PATH.
It is true for any set of mirrored parameters.
I have a small patch for zsh-3.0-pre2, which (I hope;) corrects it. It
checks, wether parameter is special, and wether it has counterpart; if
yes, it sets PM_UNIQUE for it also. It is probably incomplete (it does
nothing if counterpart doesn't exist - should it be considered an error?)
but as far as I can tell, it works in more logical way.
I think, that it would be better solved by adding one more flag (say,
PM_MIRRORED). It would provide for creating arbitrary user defined paires
of mirrored parameters. Alas! I am not so deep in zsh as to dare to write
it. I will sometime do - or is it already implemented in some other way?
Please, Cc any replies to my address.
thanks
greetings
-------------------------------------------------------------------------
Andrej Borsenkow Fax: +7 (095) 252 01 05
SNI ITS Moscow Tel: +7 (095) 252 13 88
NERV: borsenkow.msk E-Mail: borsenkow.msk@sni.de
-------------------------------------------------------------------------
===============================================
2801a2802,2811
> if ((pm->flags & PM_SPECIAL) && pm->ename) {
> Param pme;
>
> pme = (Param) paramtab->getnode(paramtab, pm->ename);
> if (pme)
> if (on & PM_UNIQUE)
> pme->flags |= PM_UNIQUE;
> else
> pme->flags &= ~PM_UNIQUE;
> };
2870a2881,2890
> if ((pm->flags & PM_SPECIAL) && pm->ename) {
> Param pme;
>
> pme = (Param) paramtab->getnode(paramtab, pm->ename);
> if (pme)
> if (on & PM_UNIQUE)
> pme->flags |= PM_UNIQUE;
> else
> pme->flags &= ~PM_UNIQUE;
> };
next reply other threads:[~1996-07-12 13:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-12 13:01 Andrej Borsenkow [this message]
1996-07-12 13:07 ` Andrej Borsenkow
1996-07-12 15:41 ` Zoltan Hidvegi
1996-07-12 15:48 ` Zefram
1996-07-12 15:48 ` 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=Pine.SV4.3.94.960712165030.23028C-100000@itsrm1 \
--to=borsenkow.msk@sni.de \
--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).