1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-14 06:13:53 -05:00

Add rbenv versions --skip-aliases option

Useful in combination with `--bare` to list just the unique version
numbers without the extra directory entries that are symlinks to other
version numbers in the same directory.
This commit is contained in:
Mislav Marohnić
2015-10-27 10:49:29 +01:00
parent 7026e529c7
commit e80886e9be
3 changed files with 79 additions and 6 deletions

View File

@@ -81,9 +81,12 @@ remove_outdated_shims() {
# List basenames of executables for every Ruby version
list_executable_names() {
local file
for file in "$RBENV_ROOT"/versions/*/bin/*; do
echo "${file##*/}"
local version file
rbenv-versions --bare --skip-aliases | \
while read version; do
for file in "${RBENV_ROOT}/versions/${version}/bin/"*; do
echo "${file##*/}"
done
done
}