Re: Docs typo, :- vs -

2025-01-30 Thread Lawrence Velázquez
On Thu, Jan 30, 2025, at 9:12 PM, Greg Wooledge wrote: > Even POSIX finally caved in and added examples > showing both syntaxes, not expecting the reader to extrapolate from > multiple sources. The devel and bash-5.3-testing branches have more examples as well. https://git.savannah.gnu.org/cgit/b

Re: Docs typo, :- vs -

2025-01-30 Thread Greg Wooledge
On Fri, Jan 31, 2025 at 01:42:38 +0100, Alfred Agrell wrote: > Hello > > https://git.savannah.gnu.org/cgit/bash.git/tree/doc/bash.info#n1842 > > '${PARAMETER:-WORD}' > If PARAMETER is unset or null, the expansion of WORD is > substituted. Otherwise, the value of PARAMETER is substitute

Docs typo, :- vs -

2025-01-30 Thread Alfred Agrell
Hello https://git.savannah.gnu.org/cgit/bash.git/tree/doc/bash.info#n1842 '${PARAMETER:-WORD}' If PARAMETER is unset or null, the expansion of WORD is substituted. Otherwise, the value of PARAMETER is substituted. $ v=123 $ echo ${v-unset} 123 The headi

Re: Discussion on wait

2025-01-30 Thread Oğuz
On Thu, Jan 30, 2025 at 8:27 PM Muhammed Mahmood wrote: > I'm curious as to why you think that it's not worth it for this functionality > to be in an option. Fewer options to remember the better. > Actually, upon closer inspection, the line of code you shared still seems a > bit incomplete. Y

Re: Discussion on wait

2025-01-30 Thread Robert Elz
Date:Thu, 30 Jan 2025 11:00:36 -0600 From:MacBeth Message-ID: | errwait() { while wait -n || return; do :; done; } Yes, that would also be good (could have the -p added as well if desired). kre

Re: Discussion on wait

2025-01-30 Thread MacBeth
On Thu, Jan 30, 2025 at 2:02 AM Robert Elz wrote: > Date:Thu, 30 Jan 2025 06:03:18 +0300 > From:=?UTF-8?B?T8SfdXo=?= > Message-ID: m3wdtjk0dfztgmfoggt2du...@mail.gmail.com> > > I'd suggest putting it in a function, something like > > wait_for_error() { >

Re: Discussion on wait

2025-01-30 Thread Robert Elz
Date:Thu, 30 Jan 2025 06:03:18 +0300 From:=?UTF-8?B?T8SfdXo=?= Message-ID: | `while wait -n; do :; done' already does that Not quite, after that loop $? = 0 (always) so there's no way to tell whether or not one of the commands failed, which I suspect was the orig