These variables should always be initialized by local.
Properly quote lines.
Use getopts to make command line parsing comprehensive.
Output the list to stdout instead of stderr.
Sort a list in descending order and show only top 10 if stdout is a tty.

Completion candidates are also sorted in the same order as z -l does.
Why drop the first three letters of user input in completion, anyway?
Ignore the $HOME part in search.
Perform a substring match rather than a regexp match.

Dots are better treated as dots, not a wildcard.
Show directory names using the tilde symbol in zsh completion.

Switch zsh completion from compctl to compsys while at it.