You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

23 lines
404 B

#!/usr/bin/env bash -e
RBENV_VERSION="$(rbenv-version)"
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 "${hit_prefix}${version}"
else
echo "${miss_prefix}${version}"
fi
fi
done