treecopy() { dest=${!#} files_count=$# while(( $# > 1 )); do shift done } The above piece can't be handled well. Specifically, ${!#} and while(( $# > 1 )) can't be interpreted.
fixed with http://git.overlays.gentoo.org/gitweb/?p=proj/libbash.git;a=commit;h=976e5bde79b1286fbf45f3ac2abcf124ade06d22