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

Re: "set -o foo" does not fail / does not abort the shell



Bart Schaefer wrote:
> On Dec 11,  1:56pm, Peter Stephenson wrote:
> }
> } Vincent Lefevre wrote:
> } > I've tried the following with zsh-4.3.4-dev-4:
> } > 
> } > $ Src/zsh -f -c 'emulate sh; set -o foo; echo "Didn''t abort ($?)"'
> } > set: no such option: foo
> } > Didn't abort (0)
> } > 
> } > This is incorrect. The shell should abort as 'set' is a special
> } > builtin[*]:
> } 
> } This is easy.
> 
> I'm left wondering if this shouldn't be a POSIX-mode thing, i.e. whether
> zsh in "native mode" should continue as it has.

I'd be more impressed with that if zsh as it was even returned a
non-zero status in this case, but it doesn't.  So some kind of change
definitely seems warranted.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



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