bug-bash
[Top][All Lists]
Advanced

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

Re: 2.0..devel: `set -u; a=1; echo ${#a[@]}' fails


From: Koichi Murase
Subject: Re: 2.0..devel: `set -u; a=1; echo ${#a[@]}' fails
Date: Tue, 8 Apr 2025 01:36:13 +0900

Thank you for your answer.

2025年4月8日(火) 0:40 Chet Ramey <chet.ramey@case.edu>:
> OK, so you're asking for a new feature/behavior change.

Yes.

> don't get me wrong, but it's a little late in the cycle for bash-5.3.

Yeah, that makes sense. I don't mind if the change would be applied in
a later version.

> > I'd be happy if the current behavior is fixed.
>
> So to be clear, you're requesting a behavior change so that expanding
> ${#a[0]}, ${#a[*]}, and ${#a[@]}, where a is a scalar variable, when
> nounset is enabled, does not result in an unbound variable error.

Right. That is the behavior I naively expect.

--
Koichi



reply via email to

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