Re: "environment:" instead of $0 in front of fatal errors from functions

2023-05-25 Thread Chet Ramey
On 5/22/23 8:36 AM, Emanuele Torre wrote: Error messages for fatal error e.g. ${x?foo} or rovar=foo or $x expanded with nounset, report an error message prefixed by the string "environment:" instead of "scriptname:" (or "$0:"). Thanks for the report. Error messages during function execu

"environment:" instead of $0 in front of fatal errors from functions

2023-05-22 Thread Emanuele Torre
Error messages for fatal error e.g. ${x?foo} or rovar=foo or $x expanded with nounset, report an error message prefixed by the string "environment:" instead of "scriptname:" (or "$0:"). $ bash -c '${x?hi}' asd asd: line 1: x: hi $ bash -c 'a () { ${x?hi} ;}; a' asd environment: lin