Re: An inconsistency of the outputs of help builtin

2024-12-20 Thread Greg Wooledge
On Fri, Dec 20, 2024 at 19:30:49 -0500, Lawrence Velázquez wrote: > On Fri, Dec 20, 2024, at 8:09 AM, Greg Wooledge wrote: > > help -d cdoes not exactly match anything, so it's treated like c\* > > Is this documented somewhere? I'm not seeing anything about it in > the man page or texinfo man

Re: An inconsistency of the outputs of help builtin

2024-12-20 Thread Lawrence Velázquez
On Fri, Dec 20, 2024, at 8:09 AM, Greg Wooledge wrote: > help -d cdoes not exactly match anything, so it's treated like c\* Is this documented somewhere? I'm not seeing anything about it in the man page or texinfo manual. -- vq

Re: ${| command; } funsub not setting REPLY does not error out with 'set -u' active

2024-12-20 Thread Martin D Kealey
On Sat, 21 Dec 2024, 04:01 Zachary Santer, wrote: > On Fri, Dec 20, 2024 at 11:50 AM Greg Wooledge wrote: > > I don't think your definition of "explicit" matches mine. > > ${variable} and ${| command; } are explicit expansions in the sense > that I had to write them in the script for the expansi

Re: ${| command; } funsub not setting REPLY does not error out with 'set -u' active

2024-12-20 Thread Zachary Santer
On Fri, Dec 20, 2024 at 11:50 AM Greg Wooledge wrote: > > On Fri, Dec 20, 2024 at 11:04:35 -0500, Zachary Santer wrote: > > On Thu, Dec 19, 2024 at 11:08 AM Chet Ramey wrote: > > > So you're saying that bash looking at a specific variable and using its > > > value should fail if that variable is

Re: ${| command; } funsub not setting REPLY does not error out with 'set -u' active

2024-12-20 Thread Greg Wooledge
On Fri, Dec 20, 2024 at 11:04:35 -0500, Zachary Santer wrote: > On Thu, Dec 19, 2024 at 11:08 AM Chet Ramey wrote: > > So you're saying that bash looking at a specific variable and using its > > value should fail if that variable is unset? How far do you want to > > take that? PS2? PS4? GLOBIGNORE

Re: ${| command; } funsub not setting REPLY does not error out with 'set -u' active

2024-12-20 Thread Zachary Santer
On Thu, Dec 19, 2024 at 11:08 AM Chet Ramey wrote: > > On 12/18/24 9:39 PM, Zachary Santer wrote: > > > If one wants to use funsubs that don't expand to anything as a > > workaround like this, it might be more efficient to use the ${| > > command; } form, as bash then isn't pointlessly redirecting

Re: An inconsistency of the outputs of help builtin

2024-12-20 Thread Greg Wooledge
On Fri, Dec 20, 2024 at 04:50:17 -0800, Wiley Young wrote: > For some reason, while `help -d 'c'` prints the same thing as `help -c > 'c*'` (note the asterisk), the same is not true when the character is > left-bracket: `help -c '[*'. Why did you expect them to be the same? Assuming you meant -d

An inconsistency of the outputs of help builtin

2024-12-20 Thread Wiley Young
Testing how bash's help builtin responds to each character. For some reason, while `help -d 'c'` prints the same thing as `help -c 'c*'` (note the asterisk), the same is not true when the character is left-bracket: `help -c '[*'. This issue persists on bash 5.3 beta. # Input: [liveuser@fedora ~]