Update base.theme.bash

Added feature to detect the ruby version interpreter
```bash
       rb_interp_prompt
```
and added to the existing function to be used in any theme.
This commit is contained in:
Luis Felipe Sánchez
2017-11-22 10:14:38 -05:00
committed by GitHub
parent 76e4659126
commit 31a0c6a9fd

View File

@@ -383,8 +383,13 @@ function chruby_version_prompt {
fi
}
function rb_interp_prompt {
rb_version=$(ruby --version | awk '{print $2;}') || return
echo -e "${RUBY_THEME_PROMPT_PREFIX}${rb_version}${RUBY_THEME_PROMPT_SUFFIX}"
}
function ruby_version_prompt {
echo -e "$(rbfu_version_prompt)$(rbenv_version_prompt)$(rvm_version_prompt)$(chruby_version_prompt)"
echo -e "$(rbfu_version_prompt)$(rbenv_version_prompt)$(rvm_version_prompt)$(chruby_version_prompt)$(rb_interp_prompt)"
}
function virtualenv_prompt {