Re: declare/local severely mishandle arrays with quoted -g/-A
From:
collectthis
Subject:
Re: declare/local severely mishandle arrays with quoted -g/-A
Date:
Mon, 28 Sep 2026 20:52:20 +0000
The last part of my last reply is broken, I accidentally pressed space after tab
and it got sent prematurely.
My point was to show the result of missing the second -g:
declare -r arr
declare -ai arr=([0]="1" [1]="2" [2]="3")
Which is not what a user would intend, to illustrate the silliness of avoiding
the single command form of declare.