Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Problem with an exported array
- X-seq: zsh-workers 19117
- From: DervishD <raul@xxxxxxxxxxxx>
- To: Danek Duvall <duvall@xxxxxxxxxxx>, Zsh <zsh-workers@xxxxxxxxxx>
- Subject: Re: Problem with an exported array
- Date: Mon, 22 Sep 2003 18:30:54 +0200
- In-reply-to: <20030922144528.GC12272@xxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Danek Duvall <duvall@xxxxxxxxxxx>, Zsh <zsh-workers@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: Pleyades
- References: <8001.1064238241@xxxxxxx> <1030922142208.ZM19975@xxxxxxxxxxxxxxxxxxxxxxx> <20030922144528.GC12272@xxxxxxxxxxxxxxxxxx>
Hi Danek :)
* Danek Duvall <duvall@xxxxxxxxxxx> dixit:
> Or, yet more generally, specify a function to transform the array into
> the scalar?
There are a few ways of doing that. If you have 'pager', the
array, and you want 'PAGER', the scalar, you can transform 'pager' in
'PAGER' with:
- PAGER="$pager"
- PAGER="${(f)pager}"
- PAGER="${(ps:<CHAR>:)pager}"
- Surely others...
The first two are equivalent, and the third is useful if you want
to fold the array using <CHAR> instead of '\n'. What I want is not a
way of converting the array to an scalar, but a way of doing that
*automatically*, as is already done with PATH or any other colon
delimited variable ;))
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author