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

Re: "${(s.:.)foo} and rc_expand_param



On Mar 6,  8:13pm, Frank Terbeck wrote:
} Subject: "${(s.:.)foo} and rc_expand_param
}
}   s:string:
}       For historical reasons, the usual behaviour that empty array
}       elements are retained inside double quotes is disabled for arrays
}       generated by splitting; hence the following:
} 
} zsh% setopt rc_expand_param
} zsh% print -l "${(s.:.)foo}"
} bar
} 
} baz
} 
} Am I missing something here or is this a bug?

I believe zsh is being faithful to the "rc" shell's behavior here.  The
doc note about "historical reasons" was added pretty recently, as was
the override of that behavor that's possible by using @s, so it's most
likely that there was always and intentionally this exception but that
it was missed when the doc was updated.

-- 



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