xcode: extend xcselv to list versions and do completion

This commit is contained in:
Andrew Janke authored and Marc Cornellà committed 2015-09-11 21:06:18 +02:00
1 parent 82ae41ca4c
commit 6642a99fac
3 files changed
+214 -21

No files matched your search

+19
View File
@@ -0,0 +1,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