mirror of
https://github.com/rbenv/rbenv.git
synced 2025-01-01 14:45:03 +01:00
14 lines
305 B
Text
14 lines
305 B
Text
|
#compdef rbenv
|
||
|
|
||
|
_rbenv() {
|
||
|
local completions
|
||
|
|
||
|
if [ "${#words}" -eq 2 ]; then
|
||
|
completions=(${(f)"$(rbenv help --complete-commands "${words[2]}")"})
|
||
|
_describe 'rbenv commands' completions
|
||
|
else
|
||
|
completions="$(rbenv completions ${words[2,-2]})"
|
||
|
compadd - "${(ps:\n:)completions}"
|
||
|
fi
|
||
|
}
|