Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: join a string with a parameter value if it's not empy
On 04/02/2023 04:20, Eric Nielsen wrote:
$p${p:+_}string
Nice!
Really I thought about the second way simplification, when I ask this
question (:
It's more common, as it allows to join several parts.
tmp=($p 'string' whatever else)
${(j.#.)tmp}
Is it possible to construct an array without a tmp parameter? Without
splitting.
--
sergio.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author