Closed
Description
We currently use local readonly
to declare local, read-only variables. It turns out that this is not the right way to do it. The proper way is:
local -r var="$1"
For arrays, you need:
local -ar var=(foo bar)
We currently use local readonly
to declare local, read-only variables. It turns out that this is not the right way to do it. The proper way is:
local -r var="$1"
For arrays, you need:
local -ar var=(foo bar)