From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2649 invoked from network); 12 Jan 1998 21:35:48 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 12 Jan 1998 21:35:48 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id QAA12017; Mon, 12 Jan 1998 16:24:07 -0500 (EST) Resent-Date: Mon, 12 Jan 1998 16:23:22 -0500 (EST) Sender: rz2a022@rrz.uni-hamburg.de Message-ID: <34BA8A1B.4FE1AAC4@rrz.uni-hamburg.de> Date: Mon, 12 Jan 1998 22:24:43 +0100 From: Bernd Eggink Organization: Regionales Rechenzentrum der Uni Hamburg X-Mailer: Mozilla 4.03 [en] (X11; I; Linux 2.0.30 i586) MIME-Version: 1.0 To: zsh mailing list CC: zefram@tao.co.uk Subject: Re: Exporting arrays References: <199801121515.PAA11821@taos.demon.co.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Resent-Message-ID: <"zFkuc2.0.4x2.9dekq"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1222 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Zefram wrote: > > Bernd Eggink wrote: > > a=(${(s(:))aex}) > > > >Unfortunately this doesn't work if an array element is empty! Example: > > Both behaviours are useful. What would really be nice would be to > make the delimiter a glob pattern, so that both behaviours (and more) > are available. Hm, for me just the two of them would be enough... > That would make the default behave the way you want it, > which is probably better overall, because if one really wanted the other > form of splitting then this would become immediately obvious. Why not simply supply a separate flag? At present, things are really confusing: the 's' flags works this way, option SH_WORD_SPLIT the other way. And, to deepen confusion, the documentation of the 's' flag refers to option SH_WORD_SPLIT as if both were equivalent! Bernd -- Bernd Eggink Regionales Rechenzentrum der Universitaet Hamburg eggink@rrz.uni-hamburg.de http://www.rrz.uni-hamburg.de/eggink/BEggink.html