The colon parameter extension is not in POSIX, but it works with at least zsh, bash and ksh:
${@:$#}
When there are no arguments, ${@:$#} treated as $0 in zsh and ksh, but as empty in bash:
$ zsh -c 'echo ${@:$#}' zsh $ ksh -c 'echo ${@:$#}' ksh $ bash -c 'echo ${@:$#}' $
source share