Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Exporting arrays



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@xxxxxxxxxxxxxxxxxx
http://www.rrz.uni-hamburg.de/eggink/BEggink.html



Messages sorted by: Reverse Date, Date, Thread, Author