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

Re: Belaboring substitution syntax



On Wed, Nov 16, 2022 at 2:50 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Tue, Nov 15, 2022 at 6:18 AM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
> >
> > In my case, leaving the quotes out doesn't *seem* to matter but I know it would bite me eventually.  When would it bite me?
>
> In the specific example in this thread, zsh's default array behavior
> (no_SH_WORD_SPLIT) is sufficient, but if you later enclose that or a
> similar construct in a deeper context, yes, you might be bitten.

Without the quotes empty elements will be dropped. Ray wants ${#cc} to
stay unchanged, so quotes are required.

Roman.




Messages sorted by: Reverse Date, Date, Thread, Author