I have a bunch of ZSH functions which are pretty verbose, and I'd like to use zsh completion on them. Example:
qq-enum-dns-txfr-host
qq-enum-dns-brute-rev
qq-enum-dns-tcpdump
qq-enum-web-php-lfi-logfile
qq-enum-smb-tcpdump
qq-enum-web-php-ffuf-common-php
qq-enum-ftp-tcpdump
When I type qq-tcp
Tab I'd like to get completions of:
qq-enum-dns-tcpdump
qq-enum-smb-tcpdump
qq-enum-ftp-tcpdump
All the documentation I can find deals with how to complete arguments to a given command or function, but doesn't say how to use the substring (not prefix) completion to figure out which function to use in the first place.
I guess I could refactor so that each function is instead an argument to a qq
command. But is there a simpler way I'm missing?