support rbenv version in skwp prompt
This commit is contained in:
parent
8d24153ce2
commit
fae42395f5
@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# A theme based on steeef theme
|
# A theme based on steeef theme
|
||||||
# * RVM info shown on the right
|
# * RVM/Rbenv info shown on the right
|
||||||
# * Git branch info on the left
|
# * Git branch info on the left
|
||||||
# * Single line prompt
|
# * Single line prompt
|
||||||
#
|
#
|
||||||
@ -15,10 +15,12 @@
|
|||||||
function rvm_info_for_prompt {
|
function rvm_info_for_prompt {
|
||||||
if [[ -d ~/.rvm/ ]]; then
|
if [[ -d ~/.rvm/ ]]; then
|
||||||
ruby_version=$(~/.rvm/bin/rvm-prompt)
|
ruby_version=$(~/.rvm/bin/rvm-prompt)
|
||||||
|
elif [[ -d ~/.rbenv/ ]]; then
|
||||||
|
ruby_version=$(<~/.rbenv/version)
|
||||||
|
fi
|
||||||
if [ -n "$ruby_version" ]; then
|
if [ -n "$ruby_version" ]; then
|
||||||
echo "[$ruby_version]"
|
echo "[$ruby_version]"
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function prompt_skwp_precmd {
|
function prompt_skwp_precmd {
|
||||||
|
Loading…
Reference in New Issue
Block a user