X-Git-Url: https://git.r.bdr.sh/rbdr/dotfiles/blobdiff_plain/f58f5a8243ba822d6ee991c7dc174ff82ea47aa9..4efcafab7f0aa454f9ebe767133654bc9f44e12c:/prompt_ben_setup?ds=sidebyside diff --git a/prompt_ben_setup b/prompt_ben_setup index 3c16c78..0399e4e 100644 --- a/prompt_ben_setup +++ b/prompt_ben_setup @@ -2,17 +2,31 @@ function prompt_ben_precmd { git-info } -function rvm_info { - echo '('`rvm-prompt v p g`')' -} - function virtualenv_info { if [[ -z "$VIRTUAL_ENV" ]]; then venv="default" else venv="${VIRTUAL_ENV##*/}" fi - echo "(${venv})" + echo "🐍${venv}" +} + +function rvm_info { + if [[ -z "$RUBY_VERSION" ]]; then + rvminfo="default" + else + rvminfo=`rvm-prompt` + fi + echo "💎${rvminfo}" +} + +function nvm_info { + if [[ -z "$NVM_BIN" ]]; then + nvminfo="default" + else + nvminfo=`nvm current` + fi + echo "💛${nvminfo}" } function box_name { @@ -51,7 +65,8 @@ function prompt_ben_setup { # Define prompts. PROMPT=' -%{%F{red}%}%n%{%f%}@%{%F{yellow}%}$(box_name)%{%f%} %{%B%F{green}%}${PWD/#$HOME/~}%{%f%b%}${git_info[prompt]} %{%F{black}%}$(rvm_info)$(virtualenv_info)%{%f%} +%{%F{black}%}$(nvm_info) $(rvm_info) $(virtualenv_info) +%{%F{red}%}%n%{%f%}@%{%F{yellow}%}$(box_name)%{%f%} %{%B%F{green}%}${PWD/#$HOME/~}%{%f%b%}${git_info[prompt]} %{%f%} %(?,,%{${%B%F{white}%}[%?]%{%f%b%} )$ ' }