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

Re: "return" behaves differently in .zlogout (Was: Subshell return codes are discarded during logout?)



On Fri, Dec 27, 2024, at 2:23 PM, Bart Schaefer wrote:
> That is, "return" does not clobber the exit status specified for the 
> top-level shell, whereas a subsequent explicit "exit" does so.

Ah, it permits quitting .zlogout early without having to juggle the
original $?.  I can see why that's useful, but I had no idea it was
an option because it doesn't seem to be documented.

-- 
vq




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