哦,我的zsh:没有安装命令没有消息

时间:2017-11-18 09:06:35

标签: zsh fedora oh-my-zsh

我不知道zsh或者我的zsh是否有问题。 如果我尝试运行未安装的命令,则不会显示错误消息。

示例哦我的zsh:

➜  ~ svn -version
➜  ~

示例bash:

[mrclrchtr@fedora ~] $ svn -version
bash: svn: command not found
[mrclrchtr@fedora ~] $ 

有没有人知道为什么zsh中没有错误信息?

编辑: 这是我的删节〜/ .zshrc

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
  export ZSH=/home/mrclrchtr/.oh-my-zsh

# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
  git
)

source $ZSH/oh-my-zsh.sh

修改2

➜  ~ trap
➜  ~ whence -c command_not_found_handler
command_not_found_handler () {
    runcnf=1 
    retval=127 
    [ ! -S /var/run/dbus/system_bus_socket ] && runcnf=0 
    [ ! -x /usr/libexec/packagekitd ] && runcnf=0 
    if [ $runcnf -eq 1 ]
    then
        /usr/libexec/pk-command-not-found $@
        retval=$? 
    fi
    return $retval
}
➜  ~

0 个答案:

没有答案