在zsh下获取命令未找到的工作

我试图让Ubuntu下的command-not-foundfunction在zsh下工作,没有运气:

 ➜ ~ pdfunite zsh: command not found: pdfunite ➜ ~ bash u@ub:~$ pdfunite The program 'pdfunite' is currently not installed. You can install it by typing: sudo apt-get install poppler-utils 

有谁知道是否有可用的包也支持zsh?

谢谢。

你必须在你的.zshrc中找到它:

 if [[ -s '/etc/zsh_command_not_found' ]]; then source '/etc/zsh_command_not_found' fi 

该脚本是包命令 – 未找到的一部分

 $ apt-cache search zsh_command_not_found > command-not-found: /etc/zsh_command_not_found