_xcselv 469 B

12345678910111213141516171819
  1. #compdef xcselv
  2. #autoload
  3. function _xcselv_compl_list_versions() {
  4. _omz_xcode_list_versions short
  5. }
  6. _arguments \
  7. '(-l -L -p)-h[prints a help message]' \
  8. '(-L -p -h)-l[lists installed Xcode versions]' \
  9. '(-l -p -h)-L[lists installed Xcode versions (long form)]' \
  10. '(-h -l -L)-p[prints active Xcode version]' \
  11. && ret=0
  12. local _xcode_versions
  13. _xcode_versions=($(_xcselv_compl_list_versions))
  14. _describe -t _xcode_versions 'version' _xcode_versions
  15. return 1