(Ubuntu 18.04) It seems zsh no longer prints the "command not found: foo" message itself; everything is left to the handler.
Therefore, passing --no-failure-msg to /usr/lib/command-not-found causes no message to be printed at all:
17:34:42 0 aib@vivaldi:/tmp% which fooo fooo not found 17:34:45 1 aib@vivaldi:/tmp% fooo 17:34:47 127 aib@vivaldi:/tmp%
(Ubuntu 18.04)
It seems zsh no longer prints the "command not found: foo" message itself; everything is left to the handler.
Therefore, passing --no-failure-msg to /usr/lib/ command- not-found causes no message to be printed at all:
17:34:42 0 aib@vivaldi:/tmp% which fooo
fooo not found
17:34:45 1 aib@vivaldi:/tmp% fooo
17:34:47 127 aib@vivaldi:/tmp%