zsh 找不到许多命令

zsh 找不到许多命令

如果我使用 Tab 自动完成,大多数时候我都会收到错误:

  • 如果我vim [TAB]查找文件夹中的文件,它只会跳转到下一个命令行。

  • 如果我尝试执行,rvm use 2.0.0 --default我会得到zsh: correct 'rvm' to 'rvim' [nyae]?。如果我说不,我会得到找不到命令错误。

  • 如果我TAB在输入后按下ruby -v,zsh 会更正为_ruby -v

  • 如果我输入完整的命令而不输入TAB. zsh 想要更正ruby_rubyrvmrvim

这是已知的错误吗?或者有什么帮助吗?

编辑:添加了.zshrc

# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh

# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="blinks"

# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"

# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"

# Comment this out to disable bi-weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"

# Uncomment to change how often before auto-updates occur? (in days)
# export UPDATE_ZSH_DAYS=13

# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"

# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment following line if you want to disable command autocorrection
# DISABLE_CORRECTION="true"

# Uncomment following line if you want red dots to be displayed while waiting for completion
COMPLETION_WAITING_DOTS="true"

# Uncomment following line if you want to disable marking untracked files under
# VCS as dirty. This makes repository status check for large repositories much,
# much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# 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)
plugins=(git ruby rails autojump)

source $ZSH/oh-my-zsh.sh

autoload -U compinit && compinit

# Customize to your needs...
export PATH=$PATH:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scriptingTH=$PATH:$HOME/.rvm/bin

答案1

你需要

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" 

里面.zprofile,还有 PATH=$PATH:$HOME/.rvm/bin 里面.zshrc

编辑:这是 rvm 的问题,我没有遇到其他错误。但是,如果我是你,我会尝试备份现有的 zsh 配置文件,然后安装grml-zsh-conf。(当然,您需要在 grml conf 上添加 rvm 内容)。如果 zsh 现在运行正常,则您的 conf 中可能存在问题。如果可以,请显示出来。

相关内容