zsh: excluding files from a pattern

zsh has the ^ glob operator when EXTENDED_GLOB is on. It seems like the perfect fit for your stated situation:

setopt extendedglob
print -rl foo/^type_A*

It means “match anything, except what matches the following pattern”, but its effect is limited to the portion of the pattern between slashes, or between the beginning of the pattern and the first slash, or (as in this case) between the last slash and the end of the pattern.

You can view the zsh options currently enabled with:

setopt

And disable EXTENDED_GLOB with:

unsetopt extendedglob

You need to include the directory into the exception: print -l foo/*~foo/type_A* or print -l foo/*~{foo/type_A*}.

If you want, you can replace the directory by a wildcard: print -l foo/*~*/type_A*