Improve auto-completion for arguments

fixes #7375