Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
bash script that displays the current ruby in use by rvm as part of the prompt
function red_text {
local LIGHT_RED="\[\033[1;31m\]"
local NO_COLOR="\[\033[0m\]"
function green_text {
local LIGHT_GREEN="\[\033[1;32m\]"
local NO_COLOR="\[\033[0m\]"
function rvm_prompt {
local RVM_PROMPT_CMD="~/.rvm/bin/rvm-prompt i v g s"
echo "'\$($RVM_PROMPT_CMD)'"
function include_rvm_in_prompt {
PS1="\n$(red_text ':rvm') => $(green_text "$(rvm_prompt)")\n$PS1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.