mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-15 23:03:53 -05:00
Defer to rbenv versions instead of reading ~/.rbenv/versions manually
This commit is contained in:
@@ -9,13 +9,10 @@ _rbenv_commands() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_rbenv_versions() {
|
_rbenv_versions() {
|
||||||
local cur versions
|
|
||||||
local ROOT="${HOME}/.rbenv/versions"
|
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=${COMP_WORDS[COMP_CWORD]}
|
local cur=${COMP_WORDS[COMP_CWORD]}
|
||||||
versions=($ROOT/*)
|
local versions=(system $(rbenv versions --bare))
|
||||||
# remove all but the final part of the name
|
versions="${versions[@]}"
|
||||||
versions="${versions[@]##*/}"
|
|
||||||
|
|
||||||
COMPREPLY=( $( compgen -W "$versions" -- $cur ) )
|
COMPREPLY=( $( compgen -W "$versions" -- $cur ) )
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user