You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
357 B

13 years ago
  1. _rbenv() {
  2. COMPREPLY=()
  3. local word="${COMP_WORDS[COMP_CWORD]}"
  4. if [ "$COMP_CWORD" -eq 1 ]; then
  5. COMPREPLY=( $(compgen -W "$(rbenv commands)" -- "$word") )
  6. else
  7. local command="${COMP_WORDS[1]}"
  8. local completions="$(rbenv completions "$command")"
  9. COMPREPLY=( $(compgen -W "$completions" -- "$word") )
  10. fi
  11. }
  12. complete -F _rbenv rbenv