Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: extra arguments inserted by glob thinger e:: get sorted afterwards
- X-seq: zsh-workers 27691
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: extra arguments inserted by glob thinger e:: get sorted afterwards
- Date: Mon, 08 Feb 2010 09:42:41 -0800
- In-reply-to: <237967ef1002080916w5fea886bi888a087ea62fc9cb@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <237967ef1002050715o3be2d441rcc8dbeb3e2b00483@xxxxxxxxxxxxxx> <slrnhmvok6.2k5.joerg@xxxxxxxxxxxx> <87ljf3yk0f.fsf@xxxxxxxxxxxxxxxxxxxxxx> <237967ef1002080916w5fea886bi888a087ea62fc9cb@xxxxxxxxxxxxxx>
On Feb 8, 6:16pm, Mikael Magnusson wrote:
}
} As an aside, is "$(echo a b c)" the only way to get an 'inline' array
} in a ${} expression?
The most obvious is ${=:-one two three} which applies word splitting
to the string to the right of the hyphen. Interestingly this even
works with quoting, where I had assumed it would break within words:
zsh% print -l ${=:-"one two" three\ four 'five six'}
one two
three four
five six
And you can combine it with rcexpandparam:
zsh% print -l X${^=:-"one two" three\ four 'five six'}Z
Xone twoZ
Xthree fourZ
Xfive sixZ
--
Messages sorted by:
Reverse Date,
Date,
Thread,
Author