rbenv/completions/_rbenv

14 lines
305 B
Text
Raw Normal View History

#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
}