Re: integer variable that unsets itself causes segfault

2025-08-11 Thread Oğuz
On Mon, Aug 11, 2025 at 6:18 PM Chet Ramey wrote: > I can add an error message > for this case, since the original value (a[x]) is valid, something like > > declare: a[x]: expands to invalid variable name for name reference Yeah that'd be nice. Thanks

Re: `kill --help` prints output of `help kill`

2025-08-11 Thread Wiley Young
I appreciate your perspective, Larry. Thx all, Wiley On Sun, Aug 10, 2025, 21:00 Lawrence Velázquez wrote: > On Sun, Aug 10, 2025, at 11:19 PM, Wiley Young wrote: > > Because accuracy matters. > > I don't know what point you're replying to here. > > > The reverse case applies with `getopts --he

Re: integer variable that unsets itself causes segfault

2025-08-11 Thread Zachary Santer
On Mon, Aug 11, 2025 at 11:19 AM Chet Ramey wrote: > > Since you have -i, the a[x] expands to `0', which is an invalid name for > a nameref, resulting in an assignment error. I can add an error message > for this case, since the original value (a[x]) is valid, something like > > declare: a[x]: exp

Re: integer variable that unsets itself causes segfault

2025-08-11 Thread Chet Ramey
On 8/9/25 1:09 AM, Oğuz wrote: On Friday, August 8, 2025, Oğuz > wrote: > declare -in x There's also this:     $ declare -in x=a[x]     $ echo $?     1     $ declare -p x     bash: declare: x: not found The error here shouldn't be silent. Since you ha

Re: integer variable that unsets itself causes segfault

2025-08-11 Thread Chet Ramey
On 8/11/25 9:36 AM, Oğuz wrote: On Monday, August 11, 2025, Chet Ramey > wrote: What priority do you think such a contrived example should get? Don't care as long as it's fixed Low urgency, got it. -- ``The lyf so short, the craft so long to lerne.'' - Ch

Re: integer variable that unsets itself causes segfault

2025-08-11 Thread Oğuz
On Monday, August 11, 2025, Chet Ramey wrote: > What priority do you think such a contrived > example should get? > Don't care as long as it's fixed -- Oğuz

Re: `kill --help` prints output of `help kill`

2025-08-11 Thread Chet Ramey
On 8/10/25 5:17 PM, Wiley Young wrote: It seems like using that syntax would indicate an intention to use the binary. This is faulty reasoning. All the bash builtins, except for `:', `echo', `true', `false', and `test' (for obvious reasons), accept `--help'. It's part of the GNU coding standard

Using history builtin with -ps options give unexpected results

2025-08-11 Thread Шушуев Дмитрий
dead.bashbug Description: dead.bashbug

Re: integer variable that unsets itself causes segfault

2025-08-11 Thread Chet Ramey
On 8/8/25 4:04 PM, Oğuz wrote: On Friday, August 8, 2025, Chet Ramey > wrote: Thanks for the report. While exploring it I rediscovered this one from last year lists.gnu.org/archive/html/bug-bash/2024-05/msg00402.html lists.gnu.org/archive/html/bug-bash/2024-05/m

Re: `kill --help` prints output of `help kill`

2025-08-11 Thread Martin D Kealey
On Mon, 11 Aug 2025 at 13:19, Wiley Young wrote: > The reverse case applies with `getopts --help` vs. `getopt --help` as well > as with `dir --help` vs. `dirs --help`. Those would simply report 4 different messages (some of which might be complaints --help is an unknown option). Are you perhap