mirror of
https://github.com/rbenv/rbenv.git
synced 2024-12-28 20:55:38 +01:00
a3b98a4223
The new `_rbenv` script will be autoloaded by zsh as long as it's found in $FPATH. It should be the package manager's responsibility to symlink or move this file into an appropriate location. Co-authored-by: Mislav Marohnić <git@mislav.net>
13 lines
305 B
Text
13 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
|
|
}
|