我喜欢使用,zsh
但有一个bash
我想念的功能。是这个:
? ~ bash
dbugger@mercury:~$ man2html
The program 'man2html' is currently not installed. You can install it by typing:
sudo apt-get install man2html-base
dbugger@mercury:~$ exit
exit
? ~ man2html
zsh: command not found: man2html
Run Code Online (Sandbox Code Playgroud)
当我键入一个未安装但可以轻松安装的命令时,会bash
告诉您,但zsh
没有。
有没有什么办法解决这一问题?
Set*_*eth 19
确保command-not-found
安装了软件包(默认情况下应该是)。然后.zshrc
在你最喜欢的文本编辑器中打开你的文件,并在底部附加这一行:
source /etc/zsh_command_not_found
Run Code Online (Sandbox Code Playgroud)
然后运行
source .zshrc
Run Code Online (Sandbox Code Playgroud)
在您的终端中。现在,当您尝试运行未安装的程序时:
? ~ man2html
The program 'man2html' is currently not installed. You can install it by typing:
sudo apt-get install man2html-base
zsh: command not found: man2html
? ~
Run Code Online (Sandbox Code Playgroud)