WSL中Bash输入不存在命令时不显示包建议的问题求助
WSL中Bash输入不存在命令时不显示包建议的问题求助
最近我发现WSL里的Bash控制台突然不显示命令对应的包建议了,挺奇怪的。因为我平时常用ZSH,在Oh My ZSH里装了command-not-found插件后,这个功能是正常工作的,我的.zshrc里的插件配置是这样的:
# Which plugins would you like to load? # Standard plugins can be found in $ZSH/plugins/ # Custom plugins may be added to $ZSH_CUSTOM/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. plugins=(git zsh-autosuggestions zsh-syntax-highlighting fast-syntax-highlighting command-not-found)
后来我试着给Bash装了command-not-found包,用的命令是:
sudo apt install command-not-found
但装完之后还是没效果,现在输入不存在的命令比如sido,只会显示:
$ sido bash: sido: command not found
而我期望的结果应该是这样的:
$ sido No command 'sido' found, did you mean: Command 'sudo' from package 'sudo' (main) Command 'sudo' from package 'sudo-ldap' (universe)
我找了好半天都没找到解决办法,有没有大佬能帮忙看看怎么处理这个问题呀?
备注:内容来源于stack exchange,提问作者Benevos
相关产品推荐
相关产品推荐

