Before proceeding, keep the
zshcompctl man page in mind.
The syntax for completion can occasionally get a bit tricky.
A quick example:
> ls array.NOTES array.c array.h launch.c > wc -l arr< TAB >
Upon hitting the < TAB > key, zsh will take the string
arr, and resolve it to a filename that starts with
Since there is more than one file that mathes, you can make zsh present a menu of choices, or you can make zsh cycle through each option by hitting the < TAB > key repeatedly.
And this is just the beginning. Filenames are the default item to complete on. In zsh, ANYTHING can be completed, including: