How can I get Zsh to display Gemset RVM?

I would like Zsh diplay of the current RVM Ruby and gemset, for example:

$ [ ethan@devlaptop ~/ ruby-1.9.3-p194@some _gemset ] 

I installed oh-my-zsh and I activated the RVM plugin in my ~/.rvmrc as follows:

 plugins=(git ruby rails3 rvm cap) 

I checked that RVM works as recommended in the docs:

 type rvm | head -n 1 rvm is a shell function 

In the theme file, I have my hint configured as follows:

 PROMPT='%{$fg[white]%}[ % n@ %m%{$fg[cyan]%} %2c %{$reset_color%}${rvm-prompt} %{$fg[white]%}] %{$reset_color%}' 

But the hint just turns out like this:

 [ ethan@devlaptop ~ prompt ] 

When I directly run rvm-prompt on the command line, it works as expected.

Any idea what I need to fix?

+4
source share
2 answers

It was a syntax error. I need $(rvm-prompt) instead of ${rvm-prompt} .

+5
source

It sounds like a mistake. Errors should be reported to the developer, not SO

https://github.com/wayneeseguin/rvm/issues/new

0
source

Source: https://habr.com/ru/post/1436904/


All Articles