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

Re: Problem with an exported array



    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