zsh-workers
 help / color / mirror / code / Atom feed
From: Andrej Borsenkow <borsenkow.msk@sni.de>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: ZSH Users <zsh-workers@math.gatech.edu>
Subject: Re: sorting/uniq-ing an array?
Date: Mon, 10 Aug 1998 20:25:03 +0400	[thread overview]
Message-ID: <35CF1EDF.4728CD91@sni.de> (raw)
In-Reply-To: <980810085553.ZM27103@candle.brasslantern.com>

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
remember.

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
version
    (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@sni.de
============================================================


  reply	other threads:[~1998-08-10 16:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <19980809025636.18149@astaroth.nit.gwu.edu>
     [not found] ` <980809044123.ZM19065@candle.brasslantern.com>
     [not found]   ` <19980809123608.01170@astaroth.nit.gwu.edu>
     [not found]     ` <vbvho1xe7s.fsf@snake.isode.com>
1998-08-10 15:55       ` Bart Schaefer
1998-08-10 16:25         ` Andrej Borsenkow [this message]
1998-08-10 16:32         ` Zefram
1998-08-10 18:13           ` Bart Schaefer
1998-08-11  9:31             ` Bruce Stephens
1998-08-11 17:59               ` 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=35CF1EDF.4728CD91@sni.de \
    --to=borsenkow.msk@sni.de \
    --cc=schaefer@brasslantern.com \
    --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).