I'd like to have Zsh diplay the current RVM Ruby and gemset, for instance:
$ [ ethan@devlaptop ~/ ruby-1.9.3-p194@some_gemset ]
I've installed oh-my-zsh and I've activated the RVM plugin in my ~/.rvmrc
like this:
plugins=(git ruby rails3 rvm cap)
I checked that RVM is working as recommended in the docs:
type rvm | head -n 1
rvm is a shell function
In a theme file I have my prompt set up like this:
PROMPT='%{$fg[white]%}[ %n@%m%{$fg[cyan]%} %2c %{$reset_color%}${rvm-prompt} %{$fg[white]%}] %{$reset_color%}'
But the prompt just turns out to be 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?
It was a syntax error. I needed $(rvm-prompt)
instead of ${rvm-prompt}
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With