Zsh Mailing List Archive
Messages sorted by:
Re: sorting/uniq-ing an array?
- X-seq: zsh-workers 4291
- From: Andrej Borsenkow <borsenkow.msk@xxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: sorting/uniq-ing an array?
- Date: Mon, 10 Aug 1998 20:25:03 +0400
- Cc: ZSH Users <zsh-workers@xxxxxxxxxxxxxxx>
- References: <19980809025636.18149@xxxxxxxxxxxxxxxxxxxx> <980809044123.ZM19065@xxxxxxxxxxxxxxxxxxxxxxx> <19980809123608.01170@xxxxxxxxxxxxxxxxxxxx> <vbvho1xe7s.fsf@xxxxxxxxxxxxxxx> <980810085553.ZM27103@xxxxxxxxxxxxxxxxxxxxxxx>
Bart Schaefer wrote:
> On Aug 10, 12:34pm, Bruce Stephens wrote:
> } Subject: Re: sorting/uniq-ing an array?
> } "typeset -U" works for arrays, and so works for path. Unfortunately,
> } it doesn't work with (for example) LD_LIBRARY_PATH, which is a
> } colon-separated list. Annoying: this really needs configurableness.
> Is there any difference (internally) between a plain array variable and
> a colon-array, other than the set/get functions? If not, it should be
> pretty trivial to make colon-arrays a typeset-able parameter type.
It is the main difference; there are some subteltis, as far as I
But the main problem is user interface. Standard variables are lower
case for arrays/upper case for scalars. What should really be done
(assuming typeset -C stays for creating colon-array variable):
typeset -C <lower case name> => implicitly creates upper case scalar
(or the variant of it for scalar => array)
What, if the name is not all upper/lower case?
What, if variable to be created exists? Or exists and is empty?
typeset -C <scalar> <array> => allowing arbitrary binding
the same question with existing/empty variables
What to do, if one of such variables is explicitly unset? (Which one is
"master":) Going from implementation, scalar variable doesn't actually
exists and is created "on the fly", but in real life it is exactly
scalar which is used as base value. Should the second disappear as well?
Andrej Borsenkow Fax: +7 (095) 796 99 20
SNI ITS Moscow Tel: +7 (095) 796 99 24
NERV: borsenkow.msk E-Mail: borsenkow.msk@xxxxxx
Messages sorted by: