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

Re: sh compatibility issue



On Tue, Feb 22, 2011 at 05:51:18PM -0800, Bart Schaefer wrote:
> On Tuesday, February 22, 2011, Vincent Stemen <vince.lists@xxxxxxxxxxx> wrote:
> >
> > I don't think it worked. ?With this patch added, the bahaviour did not
> > change from the previous patch. ?Fatal error in sh mode not not in zsh
> > mode.
> 
> That's intentional.  Zsh is not a POSIX shell unless you tell it to
> be, so in zsh mode it behaves the way zsh always has.
> 
> As I understand it, the patch should change the behavior of other
> special builtins (in addition to exec), but only when POSIXBUILTINS is
> set.

Oh.  OK.  If that's the case, then it does appear to work as intended 
on BSD :-).

    $ /usr/bin/zsh -c 'setopt posixbuiltins; exec </nonexistent/a; echo wrong'
    zsh:1: no such file or directory: /nonexistent/a




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