mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Add --bare option to rbenv-versions
This commit is contained in:
parent
86362408f1
commit
652135db7f
1 changed files with 11 additions and 3 deletions
|
@ -2,14 +2,22 @@
|
|||
|
||||
RBENV_VERSION="$(rbenv-version)"
|
||||
|
||||
for path in ~/.rbenv/versions/*; do
|
||||
hit_prefix="* "
|
||||
miss_prefix=" "
|
||||
|
||||
if [ "$1" = "--bare" ]; then
|
||||
hit_prefix=""
|
||||
miss_prefix=""
|
||||
fi
|
||||
|
||||
for path in "${HOME}/.rbenv/versions/"*; do
|
||||
if [ -d "$path" ]; then
|
||||
version="${path##*/}"
|
||||
|
||||
if [ "$version" == "$RBENV_VERSION" ]; then
|
||||
echo "* $version"
|
||||
echo "${hit_prefix}${version}"
|
||||
else
|
||||
echo " $version"
|
||||
echo "${miss_prefix}${version}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue