> I guess it shouldn't be the shell to do that, but the terminal
How would this work over SSH? What if you're using a temporary shell as another user? Also, the terminal really shouldn't have to know what is going on in the shell in order to work reliably. Tools like tmux, screen… should not have to perform directory completion.