While I was looking at zmv: I read: if [[ -z $action ]]; then # We can't necessarily get the name of the function directly, because # of no_function_argzero stupidity. tmpf=${TMPPREFIX}zmv$$ print -P %N >$tmpf myname=$(<$tmpf) rm -f $tmpf action=$myname[-2,-1] if [[ $action != (cp|mv|ln) ]]; then print "Action $action not recognised: must be cp, mv or ln." >&2 return 1 fi fi We could use: action=${(%):-%N} (which looks like a very complicated smiley) Also, for tempfiles, there's tmpf==(print -P %N) Also, I read: print -P "%N: unrecognized option: -$OPTARG" >&2 If $OPTARG is "%", that fails Maybe it would make sense to have a %P as a printf format for prompt expansions: printf '%P: unrecognized option: -%s\n' %N "$OPTARG" Of course, the above can be written: print -nP %N >&2 print -r ": unrecognized option: -$OPTARG" >&2 or print -r "${(%):-%N}: unrecognized option: -$OPTARG" >&2 though Also, I've seen some problems with the: $find variable: $ zmv -wn '[a\\]' '$f' zmv: warning: no wildcards were found in search pattern $ zmv -wn 'a#' '$f' zmv: warning: no wildcards were found in search pattern Please find a patch attached. Please test as I'm not really confident that I didn't introduce a few pairs of half-dozens bugs ;) -- Stéphane