In zsh, I have a function called g which acts like this:
git statusThe documentation for compdef says this:
The function
compdefcan be used to associate existing completion functions with new commands. For example,compdef _pids foo
But adapting it (_git is the usual completion function for git) did not produce a working result for me (even after _git had been autoloaded):
compdef _git g
I was able to get it to work via _dispatch though:
compdef '_dispatch git git' g