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
parent
836650c776
commit
ba5e7c9268
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue