It follows the same convention as most programming languages that expose the argument list. Python’s sys.argv has the program name at index 0 and the first argument at index 1. C’s char **argv does the same: index 0 is the program name, index 1 is the first argument. So it stands to reason that Zsh’s $0 should be the program name and $1 should be the first argument…
…which, by the way, is exactly what Bash does as well.
What specifically do you dislike about zsh?
tbh it’s fine and i use it a lot more than bash.
It’s the index on 1 that ruins it for me.
Edit: come to think of it what would zsh print out for echo $0?
It follows the same convention as most programming languages that expose the argument list. Python’s
sys.argvhas the program name at index 0 and the first argument at index 1. C’schar **argvdoes the same: index 0 is the program name, index 1 is the first argument. So it stands to reason that Zsh’s$0should be the program name and$1should be the first argument……which, by the way, is exactly what Bash does as well.