diff --git a/plugins/chruby/chruby.plugin.zsh b/plugins/chruby/chruby.plugin.zsh index 998d92098..f7fedb5f2 100644 --- a/plugins/chruby/chruby.plugin.zsh +++ b/plugins/chruby/chruby.plugin.zsh @@ -111,5 +111,11 @@ function chruby_prompt_info() { } # complete on installed rubies -_chruby() { compadd $(chruby | tr -d '* ') } +_chruby() { + compadd $(chruby | tr -d '* ') + local default_path='/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin' + if PATH=${default_path} type ruby &> /dev/null; then + compadd system + fi +} compdef _chruby chruby