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.
pull/1095/head
Luis Felipe Sánchez 2017-11-22 10:14:38 -05:00 committed by GitHub
parent 76e4659126
commit 31a0c6a9fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -383,8 +383,13 @@ function chruby_version_prompt {
fi 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 { 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 { function virtualenv_prompt {