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.

18 lines
298 B

  1. if [[ ! -o interactive ]]; then
  2. return
  3. fi
  4. compctl -K _pyenv pyenv
  5. _pyenv() {
  6. local words completions
  7. read -cA words
  8. if [ "${#words}" -eq 2 ]; then
  9. completions="$(pyenv commands)"
  10. else
  11. completions="$(pyenv completions ${words[2,-2]})"
  12. fi
  13. reply=(${(ps:\n:)completions})
  14. }