Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Useful zsh/datetime things
- X-seq: zsh-users 6684
- From: Phil Pennock <phil.pennock@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Useful zsh/datetime things
- Date: Fri, 10 Oct 2003 12:42:19 +0000
- In-reply-to: <1031010044052.ZM11468@xxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <1031009172754.ZM10491@xxxxxxxxxxxxxxxxxxxxxxx> <20031009174926.GA12280@xxxxxxxxxxx> <1031010044052.ZM11468@xxxxxxxxxxxxxxxxxxxxxxx>
On 2003-10-10 at 04:40 +0000, Bart Schaefer wrote:
> Because an unquoted empty string always disappears. It just happens that
> the easiest way to get an unquoted empty string is to expand an unset or
> empty-valued parameter (the former assuming setopt no_unset).
>
> "Not split" (in the sh_word_split sense) is not equivalent to "quoted".
Ah. Good thing that long habit keeps me using "$@" instead of dropping
the quotes to get $@ for zsh then.
Any other side-effects to not quoting variables in zsh? Backslash
degree-of-toothpickiness, I suppose.
> You'd get strange effects if it didn't work this way; e.g., $* would
> always substitute an empty string, even when $# == 0.
And you could of course get an empty string by explicitly using "$*" or
"${*:-}" which would be the same, but make the intention explicit. Ta.
--
2001: Blogging invented. Promises to change the way people bore strangers with
banal anecdotes about their pets. <http://www.thelemon.net/issues/timeline.php>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author