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?)
- X-seq: zsh-workers 53289
- From: Lawrence Velázquez <larryv@xxxxxxx>
- To: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: "return" behaves differently in .zlogout (Was: Subshell return codes are discarded during logout?)
- Date: Fri, 27 Dec 2024 15:03:24 -0500
- Archived-at: <https://zsh.org/workers/53289>
- Feedback-id: iaa214773:Fastmail
- In-reply-to: <CAH+w=7ahvPd_x_qEwRXS-Ec+1hZ=y7ss1u7xy0_MrsHWFyUyhQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <e8ce63b4-2197-46c6-af89-7b73c4c1a113@sev.monster> <c862a3f3-a256-466c-ab1c-6165c86b60de@app.fastmail.com> <eed26b2f-d285-4513-a48b-e0f64254a2ef@app.fastmail.com> <CAH+w=7ahvPd_x_qEwRXS-Ec+1hZ=y7ss1u7xy0_MrsHWFyUyhQ@mail.gmail.com>
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