How can we go about making the code for getent a bit more general with respect to non-traditional locations for the binary? I ran into this while troubleshooting mdns on NixOS and not having a functional getent, but the replacement provided in compaudit. (share/zsh/5.2/function/compaudit).
-[[ -x /usr/bin/getent ]] || getent() {
+[[ -n ${commands[getent]} ]] || getent() {