您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

18 行
302 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. }