Created
October 13, 2020 05:14
-
-
Save mba811/99cc194ae386c8c8abd7b74497557fc0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ ! -o interactive ]]; then | |
return | |
fi | |
compctl -K _rbenv rbenv | |
_rbenv() { | |
local word words completions | |
read -cA words | |
word="${words[2]}" | |
if [ "${#words}" -eq 2 ]; then | |
completions="$(rbenv commands)" | |
else | |
completions="$(rbenv completions "${word}")" | |
fi | |
reply=("${(ps:\n:)completions}") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment