Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: question about parameter expansion
* Mikael Magnusson <mikachu@xxxxxxxxx> [2015-09-26 21:34]:
> Here's another variant, which may or may not be considered more
> concise (it happens to be the exact same number of characters, but
> uses fewer things, and probably doesn't work under ksh_arrays, but
> then, what does, commas abounds),
>
> bar=${${:-baz}[1,$+foo-1]}
Nice. Seems like there is another alternative
bar=${${foo-baz}#$foo}
--
Dmitri Vereshchagin
Messages sorted by:
Reverse Date,
Date,
Thread,
Author