Using `zsh -n` to syntax check gives a false positive for this case, which is valid syntax: % zsh -nc 'unalias which-command; which-command() {}' zsh:1: defining function based on alias `which-command' zsh:1: parse error near `()' This patch fixes that.