On 7/25/18 5:37 PM, Grisha Levit wrote: > shopt -s localvar_inherit > declare -A var > f() { declare var+=([0]=X); }; f
This should be an error due to mismatched array types. The local variable is an indexed array; the global variable is an associative array (though it is unset). You can't inherit that value. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/