Merge pull request #195 from cap10morgan/rbenv-skwp-prompt
support rbenv version in skwp prompt
This commit is contained in:
commit
f1b8a18671
@ -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
|
||||||
#
|
#
|
||||||
@ -18,6 +18,11 @@ function rvm_info_for_prompt {
|
|||||||
if [ -n "$ruby_version" ]; then
|
if [ -n "$ruby_version" ]; then
|
||||||
echo "[$ruby_version]"
|
echo "[$ruby_version]"
|
||||||
fi
|
fi
|
||||||
|
elif [[ -d ~/.rbenv/ ]]; then
|
||||||
|
ruby_version=(${(s: :)$(rbenv version)})
|
||||||
|
if [ -n "$ruby_version" ]; then
|
||||||
|
echo "[${ruby_version[1]}]"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user