The problem isn’t that they can’t, it’s that writing context aware shell completions is hard because every tool does things slightly differently, and typically completions are not done by the same people who wrote the CLI tool to begin with.
So you end up with a thousand edge cases where stuff isn’t 100% correct.
IME, zsh has better autocompletion (which, at the time at least, was a separate install).
- completions being aware of the subcommand
- dynamic look ups for specific values
- completions being aware of previous options, flags, and values
A lot of completions have the first. Some have the second. The last is rare. The completer needs knowledge of when flags, options, and value can be repeated and change which future options and values are suggested.