How can I pass arrays as input to a bash function using nameref? Have not found very specific information for doing this.
For instance I have an array incl which I want to pass to a function, which then returns isufx.
## Split INCL by field separator FS
for ext in "${incl[@]}"; do
if [[ "$ext" == "PROGL" ]]; then
isufx+=( --include=\*.{rc,el,c,f} )
(( vb >= 2 )) && echo " ext: $ext"
continue
elif [[ "$ext" == "PEXTD" ]]; then
isufx+=( --include=\*.{rc,el,c,f} )
isufx+=( --include=\*.{cp,cpp,f90,f95,f03,f08} )
(( vb >= 2 )) && echo " ext: $ext"
continue
elif [[ "$ext" == "TYPOG" ]]; then
isufx+=( --include=\*.{org,texi,tex} )
(( vb >= 2 )) && echo " ext: $ext"
continue
fi