powscript
powscript copied to clipboard
Expand bug: ~name=(a b c) treated as the start of a function
While implementing this:
array:shift(A)
expand
~A=(${~A[@]:slice 1})
I learned that the array initializer expression is parsed like the start of a function. booo! Technically this is a valid bash function:
~function=() {
echo "Straaange, isn't it??"
}
So I will have to make a special case for a single leading tilde in the expand zone.
wow this is indeed odd :D