On Thu, Dec 16, 2021, at 11:45 PM, Lawrence Velázquez wrote:
> Did you mean to say that ${#FOO[*]} causes an error? Because
> ${FOO[*]} does not, à la $*:
>
> [...]
>
> Like ${FOO[*]}, ${FOO[@]} and $@ are exempt from ''set -u''.
Perhaps you're using an old bash, like the one shipped with macOS?
On Thu, Dec 16, 2021, at 11:01 PM, Dale R. Worley wrote:
> A bit ago I was debugging a failing script at work. It turns out that
> when you say
> FOO=(x y z)
> then the variable FOO is an array and is defined. But when you say
> FOO=()
> then the variable FOO is an array (because ${#FOO[*
A bit ago I was debugging a failing script at work. It turns out that
when you say
FOO=(x y z)
then the variable FOO is an array and is defined. But when you say
FOO=()
then the variable FOO is an array (because ${#FOO[*]} substitutes an
integer viz. 0) but it is *not* defined (because ${
If I have a function like
function _complete_something {
printf -v __ '%q ' "$@"
logger -p debug -t something "Args: $__"
logger -p debug -t something "$(declare -p COMP_WORDS)"
}
And in COMP_WORDBREAKS I have '=' included in the assignment.
And I execute this com
On 12/16/21 1:33 PM, fatiparty--- via Bug reports for the GNU Bourne Again
SHell wrote:
>
> Have been reading the Gnu Bash Manual "6.7 Arrays" and there is no mention of
> ${#name[*]} to get the array size.
"${#NAME[SUBSCRIPT]}' expands to the length of
'${NAME[SUBSCRIPT]}'. If SUBSCRIPT is '@
Have been reading the Gnu Bash Manual "6.7 Arrays" and there is no mention of
${#name[*]} to get the array size.