Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I tab autocomplete, most of the time I get errors:

  • If I do vim [TAB] to look for the files in the folder, it just jumps to the next command line.

  • If I try to execute rvm use 2.0.0 --default I get zsh: correct 'rvm' to 'rvim' [nyae]?. If I say no, I get a command not found error.

  • If I press TAB after typing ruby -v, zsh wants to correct to _ruby -v.

  • If i type the complete command without TAB. zsh wants to correct ruby to _ruby and rvm to rvim

Is this any known bug or is there any help for this?

Edit: Added .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
share|improve this question
1  
I addition to dayid's request, try to use rehash (rebuilds command hash table) and examine the output of hash if rvm and ruby is listed. –  mpy Jun 27 '13 at 14:45
    
If you type a complete rvm or ruby command and press (Enter), does it work correctly? –  Scott Jun 27 '13 at 16:13
    
As dayid's request is gone now -- for the records: Without your ~/.zshrc file it's really hard to tell what's going on. Another point: Is rvm working with other shells? If so, what does which rvm in e.g. bash say? –  mpy Jun 27 '13 at 17:35
1  
@DennyMueller: Please (1a) review the edits that have been made to your question (click on the edited N hours ago link), (1b) determine whether they are correct, (1c) if necessary, re-edit your question yourself (click on edit) to make it right, and (2) answer my question (above). –  Scott Jun 27 '13 at 23:33
    
Made another edit, to clearify @Scott s answer. –  Denny Mueller Jun 28 '13 at 13:22

1 Answer 1

You need

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

inside .zprofile, and PATH=$PATH:$HOME/.rvm/bin inside .zshrc.

Edit: This is for rvm matter, I didn't met other errors. However, if I were you, I'd try backing up existing zsh configuration files, then installing grml-zsh-conf. (Of course you'll need to add rvm stuff on top of grml conf). If zsh now behaves normally, something is likely wrong in your conf. Please, show it, if you can.

share|improve this answer
    
This doesn’t address the OP’s problem, which focuses on autocomplete. He does not say that he can’t run rvm at all. –  Scott Jun 27 '13 at 16:15
1  
Srsrly? "If I say no, I get a command not found error." –  Szymon Szydełko Jun 27 '13 at 16:16
    
@Scott: IMHO the confusion arises due to doubleDown's edit of the question. I rejected it, but one vote was obviously not enough. I try to improve it to resemble the original meaning. –  mpy Jun 27 '13 at 17:23
    
@mpy: Well, I’ll concede that the original draft of the question left something to be desired in the clarity department, but, in my humble opinion, doubleDown’s edit was better than yours. So we’ll just have to wait for Denny Mueller to come back and clarify the matter by answering our questions. –  Scott Jun 27 '13 at 23:34
    
@Scott: My point is, that zsh: correct 'rvm' to 'rvim' [nyae]? is caused by correction (which is triggered (by default) by Ctrl-X-C or Enter (option correction set) and not by completion (which is triggered by TAB. –  mpy Jun 28 '13 at 8:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.