mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-14 20:39:55 -05:00
Defer to rbenv versions
instead of reading ~/.rbenv/versions manually
This commit is contained in:
parent
f7c463bed9
commit
df034f5d35
1 changed files with 3 additions and 6 deletions
|
@ -9,13 +9,10 @@ _rbenv_commands() {
|
|||
}
|
||||
|
||||
_rbenv_versions() {
|
||||
local cur versions
|
||||
local ROOT="${HOME}/.rbenv/versions"
|
||||
COMPREPLY=()
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
versions=($ROOT/*)
|
||||
# remove all but the final part of the name
|
||||
versions="${versions[@]##*/}"
|
||||
local cur=${COMP_WORDS[COMP_CWORD]}
|
||||
local versions=(system $(rbenv versions --bare))
|
||||
versions="${versions[@]}"
|
||||
|
||||
COMPREPLY=( $( compgen -W "$versions" -- $cur ) )
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue