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

Re: PATCH: Re: Is PRINT_EXIT_VALUE supposed to work?



On Jul 3,  6:13pm, Peter Stephenson wrote:
} Subject: Re: PATCH: Re: Is PRINT_EXIT_VALUE supposed to work?
}
} > The simplest thing seems to be the patch below.
} 
} I've been a long time getting around to looking at this, but does this
} really work?
} 
}   zsh -c 'setopt printexitvalue; fn() { false;}; fn'

It works interactively:

schaefer<501> setopt printexitvalue; fn() { false;}; fn
zsh: correct 'fn' to 'fg' [nyae]? n
zsh: correct 'fn' to 'fg' [nyae]? n
zsh: exit 1

I don't know offhand why it doesn't work with `zsh -c', and I don't have
time to look at it just now ...

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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