Wishful thinking. ![]()
They are provided either by zsh, zsh-completions or individual packages.
You can check /usr/share/zsh/site-functions/ or /usr/share/zsh/functions/Completion/.
Your tree example:
cat /usr/share/zsh/functions/Completion/Unix/_tree
EDIT: I did a quick search and there are some alternatives: https://www.reddit.com/r/zsh/comments/mhrerr/can_zsh_look_give_you_suggestions_by_looking_at/