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

Re: '>>' does not create file if set -C (noclobber) is active

Bart Schaefer schreef op 26-06-15 om 22:15:
> The goal of "emulate sh" is to provide a Bourne-sh compatible environment,
> for the most part.

I see. Since POSIX is now the lowest common denominator for the
overwhelming majority of Unix-like systems out there, I suppose I was
just assuming that was the intended target by now.

> Just for example, neither POSIX_ARGZERO nor POSIX_CD is turned on by
> default in any of the "emulate" modes, and there are a number of other
> POSIX-isms that are not (yet, at least) supported at all.

Hmm. On my system (zsh 5.0.8) POSIX_CD is in fact turned on by 'emulate
sh'. The only options I've found so far that aren't turned on, but
should be for POSIX compliance, are POSIX_ARGZERO (as you say), and
MULTIBYTE (but that was changed in git shortly after 5.0.8 was released).

So far, I've found that zsh 5.0.8 under 'emulate sh -o POSIX_ARGZERO -o
MULTIBYTE' is very close to a complete POSIX shell. I'd be very
interested to know exactly what other POSIX-isms are not yet supported
by zsh, so I can implement any necessary tests and workarounds in the
shell library I'm developing.

> That said, I'm not trying to shut down discussion of this issue, I'm just
> pointing out that we're going to be choosing a least of evils whether we
> do something or do nothing.

I understand. Thanks for your time and consideration in any case.

- Martijn

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