On Mon, Apr 25, 2016 at 03:48:17PM -0400, Grisha Levit wrote: > There seems to be a bug that if an array variable with a name matching one > of the special single-character variables exists, then that variable is > used during substring expansion and parameter transformation. [...] > # Expected behavior:set -- 1 2 3echo ${@@A} # set -- '1' '2' > '3'echo ${@:0} # bash 1 2 3 [...]
This is actually expected behaviour. The @ parameter is a special case, with $0 being argv[0]. Normally, if you do "$@" it will expand to "$1" "$2" ... "$n", without including $0. But in this case you're forcing it to expand from $0. -- Eduardo Bustamante https://dualbus.me/