Re: [BUG] quoted substring parameter expansion ignores single-quotes in the arg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Op 21-10-17 om 14:13 schreef Jilles Tjoelker:
[...]
> I think it is sufficiently clear that various special
> characters are active in ${param#word}, whether the outer substitution
> is within double-quotes or not.

Yes -- this came up on austin-group-l some time ago as well.
https://www.mail-archive.com/austin-group-l@xxxxxxxxxxxxx/msg00197.html

> Although zsh is a good interactive shell, it does not follow
> POSIX as closely; not even in sh or ksh emulation mode.

I think that may have changed. Try the latest version. Over the last
year or two, many POSIX compliance bugs have been fixed. I believe the
latest version is about as compliant as bash or dash.

Zsh does still accept the wrong "${param#'}" expansion like dash does,
but handling non-compliant input is more like an extension than actual
non-compliance. Zsh acts correctly on "${param#\'}", like dash. It also
acts correctly on "${param#'foo'}", *unlike* dash.

- M.
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux