Why not simply
DRYRUN=echo
cmd() {
$DRYRUN "$@"
}
? DRYRUN=echo
cmd() {
$DRYRUN "$@"
}
?run() { if dry; then echo "${(q-)@}" else "$@" fi }
It doesn't work all the time as the previous poster noted, but it is very low friction which is especially important when writing quick throw-away scripts.