summaryrefslogtreecommitdiff
path: root/plugins/xcode/_xcselv
blob: f9861d54b6e74df6e717658d8573035c4aafd6e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#compdef xcselv
#autoload

function _xcselv_compl_list_versions() {
  _omz_xcode_list_versions short
}

_arguments \
  '(-l -L -p)-h[prints a help message]' \
  '(-L -p -h)-l[lists installed Xcode versions]' \
  '(-l -p -h)-L[lists installed Xcode versions (long form)]' \
  '(-h -l -L)-p[prints active Xcode version]' \
  && ret=0

local _xcode_versions
_xcode_versions=($(_xcselv_compl_list_versions))
_describe -t _xcode_versions 'version' _xcode_versions

return 1