Speed up $PROMPT_COMMAND by using rvm-prompt

Running `rvm tools identifier` seems to be really slow. Using [`rvm-prompt`](https://rvm.io/workflow/prompt) greatly speeds up the evaluation of `$PROMPT_COMMAND`.
pull/662/head
Robert Rauch 2016-02-06 21:19:30 +01:00
parent 836650c776
commit ba5e7c9268
1 changed files with 2 additions and 2 deletions

View File

@ -268,8 +268,8 @@ function hg_prompt_vars {
function rvm_version_prompt { function rvm_version_prompt {
if which rvm &> /dev/null; then if which rvm &> /dev/null; then
rvm=$(rvm tools identifier) || return rvm=$(rvm-prompt) || return
if [ $rvm != "system" ]; then if [ -n "$rvm" ]; then
echo -e "$RVM_THEME_PROMPT_PREFIX$rvm$RVM_THEME_PROMPT_SUFFIX" echo -e "$RVM_THEME_PROMPT_PREFIX$rvm$RVM_THEME_PROMPT_SUFFIX"
fi fi
fi fi