I want to know which function zsh is using for tab completion of a command.
For many commands (make
, ls
, cd
…) I can apparently guess _<COMMANDNAME>
, but I might actually have overriden this setting with compdef _mycd cd
.
The reasons why I want to know this are two:
- I might want to read some function definitions to use parts of them in functions I'm writing
- I want to wrote a completion function which itself calls the completion for other commands (like one does in
_nice
, with the exception that I might not rely onshift; CURRENT--; _normal
)