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 25-06-15 om 09:30:
> So I'm still inclined to say that this
> is just not going to change, because we'd either have to (1) change it in
> native mode or (2) do one of those hacks that tests the emulation mode
> so it only works if you actually start the shell that way or (3) add an
> entirely new setopt just for this.  I don't like any of those choices.

I can understand and sympathize with this point of view. But, from my
point of view as someone writing cross-platform POSIX shell programs,
this is a legitimate compliance bug that breaks scripts running under
'set -C' that should be expected to work according to the standard. (It
has done in at least one real-life case, i.e. mine). A shell-specific
workaround ought not to be necessary for this. If the goal of 'emulate
sh' is to provide a compatible POSIX environment then this situation is
clearly inconsistent with that goal. So I hope you're willing to
reconsider and think of a solution -- perhaps a SH_APPEND shell option
(which would also apply to ksh emulation).

Thanks,

- M.



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