completion 739 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env bash
  2. if
  3. [[ -n "${ZSH_VERSION:-}" ]]
  4. then
  5. # zsh completion for Ruby Version Manager (RVM), thanks to https://github.com/JoeKun
  6. [[ " ${fpath[*]} " == *" ${rvm_scripts_path:-$rvm_path/scripts}/extras/completion.zsh "* ]] ||
  7. {
  8. fpath+=( "${rvm_scripts_path:-$rvm_path/scripts}/extras/completion.zsh" )
  9. if
  10. [[ -n "${_comp_dumpfile:-}" ]]
  11. then
  12. \command \rm -f "$_comp_dumpfile"
  13. compinit -d "$_comp_dumpfile"
  14. fi
  15. }
  16. elif
  17. [[ -n "${BASH_VERSION:-}" ]]
  18. then
  19. # bash completion for Ruby Version Manager (RVM)
  20. source "${rvm_scripts_path:-$rvm_path/scripts}/extras/completion.bash"
  21. complete -o default -F _rvm rvm
  22. else
  23. echo "RVM does not currently support completion in your shell."
  24. fi