21.7 Example

compctl -u -x 's[+] c[-1,-f],s[-f+]' \ 
  -g '~/Mail/*(:t)' - 's[-f],c[-1,-f]' -f -- mail

This is to be interpreted as follows:

If the current command is mail, then

if ((the current word begins with + and the previous word is -f) or (the current word begins with -f+)), then complete the non-directory part (the ‘:t’ glob modifier) of files in the directory ~/Mail; else

if the current word begins with -f or the previous word was -f, then complete any file; else

complete user names.