help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: :? within a function


From: Zachary Santer
Subject: Re: :? within a function
Date: Mon, 18 May 2026 07:51:22 -0400

On Mon, May 18, 2026 at 5:04 AM Robert Elz <kre@munnari.oz.au> wrote:
>
> That's too specific, the general rule for when a non-interactive shell
> would exit because of some condition or other, is that interactive shells
> instead abandon all they are doing, whatever it is, and return immediately
> to the highest level command prompt (issue PS1 and wait for a new command
> with $? set to indicate failure).

Stan already demonstrated that bash will continue sourcing whatever file.

$ cat ~/random/source-error-expansion
f1
f2
f1
$ . ~/random/source-error-expansion
bash: 1: parameter null or not set
bash: 1: parameter null or not set
bash: 1: parameter null or not set



reply via email to

[Prev in Thread] Current Thread [Next in Thread]