123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612 |
- #compdef pod
- #autoload
- # -----------------------------------------------------------------------------
- # FILE: _pod
- # DESCRIPTION: Cocoapods (0.33.0) autocomplete plugin for Oh-My-Zsh
- # http://cocoapods.org
- # AUTHOR: Alexandre Joly (alexandre.joly@mekanics.ch)
- # GITHUB: https://github.com/mekanics
- # TWITTER: @jolyAlexandre
- # VERSION: 0.0.4
- # -----------------------------------------------------------------------------
- local -a _1st_arguments
- _1st_arguments=(
- 'help:Show help for the given command.'
- 'init:Generate a Podfile for the current directory.'
- 'install:Install project dependencies'
- 'ipc:Inter-process communication'
- 'lib:Develop pods'
- 'list:List pods'
- 'outdated:Show outdated project dependencies'
- 'plugins:Show available CocoaPods plugins'
- 'push:Temporary alias for the `pod repo push` command'
- 'repo:Manage spec-repositories'
- 'search:Searches for pods'
- 'setup:Setup the CocoaPods environment'
- 'spec:Manage pod specs'
- 'trunk:Interact with trunk.cocoapods.org'
- 'try:Try a Pod!'
- 'update:Update outdated project dependencies'
- )
- local -a _repo_arguments
- _repo_arguments=(
- 'add:Add a spec repo'
- 'lint:Validates all specs in a repo'
- 'push:Push new specifications to a spec-repo'
- 'remove:Remove a spec repo.'
- 'update:Update a spec repo'
- )
- local -a _spec_arguments
- _spec_arguments=(
- 'cat:Prints a spec file'
- 'create:Create spec file stub'
- 'edit:Edit a spec file'
- 'lint:Validates a spec file'
- 'which:Prints the path of the given spec'
- )
- local -a _ipc_arguments
- _ipc_arguments=(
- 'list:Lists the specifications know to CocoaPods'
- 'podfile:Converts a Podfile to YAML'
- 'repl:The repl listens to commands on standard input'
- 'spec:Converts a podspec to JSON'
- 'update-search-index:Updates the search index'
- )
- local -a _lib_arguments
- _lib_arguments=(
- 'create:Creates a new Pod'
- 'lint:Validates a Pod'
- )
- local -a _plugins_arguments
- _plugins_arguments=(
- 'create:Creates a new plugin'
- 'list:List all known plugins'
- 'search:Search for known plugins'
- )
- local -a _list_arguments
- _list_arguments=(
- 'new:Lists pods introduced in the master spec-repo since the last check'
- )
- local -a _trunk_arguments
- _trunk_arguments=(
- 'add-owner:Add an owner to a pod'
- 'me:Display information about your sessions'
- 'push:Publish a podspec'
- 'register:Manage sessions'
- )
- local -a _trunk_me_arguments
- _trunk_me_arguments=(
- 'clean-sessions:Remove sessions'
- )
- local -a _inherited_options
- _inherited_options=(
- '(--silent)--silent[Show nothing]' \
- '(--verbose)--verbose[Show more debugging information]' \
- '(--no-ansi)--no-ansi[Show output without ANSI codes]' \
- '(--help)--help[Show help banner of specified command]'
- )
- local -a _root_options
- _root_options=(
- '(--version)--version[Show the version of CocoaPods]' \
- '(--completion-script)--completion-script[Print the auto-completion script]'
- )
- local -a _install_options
- _install_options=(
- '(--no-clean)--no-clean[Leave SCM dirs like `.git` and `.svn` intact after downloading]' \
- '(--no-integrate)--no-integrate[Skip integration of the Pods libraries in the Xcode project(s)]' \
- '(--no-repo-update)--no-repo-update[Skip running `pod repo update` before install]'
- )
- local -a _lib_lint_options
- _lib_lint_options=(
- '(--quick)--quick[Lint skips checks that would require to download and build the spec]' \
- '(--only-errors)--only-errors[Lint validates even if warnings are present]' \
- '(--subspec=NAME)--subspec=[Lint validates only the given subspec]' \
- '(--no-subspecs)--no-subspecs[Lint skips validation of subspecs]' \
- '(--no-clean)--no-clean[Lint leaves the build directory intact for inspection]'
- )
- local -a _update_options
- _update_options=(
- '(--no-clean)--no-clean[Leave SCM dirs like `.git` and `.svn intact after downloading]' \
- '(--no-integrate)--no-integrate[Skip integration of the Pods libraries in the Xcode project(s)]' \
- '(--no-repo-update)--no-repo-update[Skip running `pod repo update before install]'
- )
- local -a _outdated_options
- _outdated_options=(
- '(--no-repo-update)--no-repo-update[Skip running `pod repo update` before install]'
- )
- local -a _search_options
- _search_options=(
- '(--full)--full[Search by name, summary, and description]' \
- '(--stats)--stats[Show additional stats (like GitHub watchers and forks)]' \
- '(--ios)--ios[Restricts the search to Pods supported on iOS]' \
- '(--osx)--osx[Restricts the search to Pods supported on OS X]' \
- '(--web)--web[Searches on cocoapods.org]'
- )
- local -a _list_options
- _list_options=(
- '(--update)--update[Run `pod repo update` before listing]'
- )
- local -a _plugins_search_options
- _plugins_search_options=(
- '(--full)--full[Search by name, author, and description]'
- )
- local -a _repo_push_options
- _repo_push_options=(
- '(--allow-warnings)--allow-warnings[Allows pushing even if there are warnings]' \
- '(--local-only)--local-only[Does not perform the step of pushing REPO to its remote]' \
- '*:script or directory:_files'
- )
- local -a _repo_add_options
- _repo_add_options=(
- '(--shallow)--shallow[Create a shallow clone (fast clone, but no push capabilities)]'
- )
- local -a _repo_lint_options
- _repo_lint_options=(
- '(--only-errors)--only-errors[Lint presents only the errors]'
- )
- local -a _setup_options
- _setup_options=(
- '(--no-shallow)--no-shallow[Clone full history so push will work]'
- '(--push)--push[Use this option to enable push access once granted]'
- )
- local -a _spec_lint_options
- _spec_lint_options=(
- '(--quick)--quick[Lint skips checks that would require to download and build the spec]' \
- '(--only-errors)--only-errors[Lint validates even if warnings are present]' \
- '(--subspec=NAME)--subspec=[Lint validates only the given subspec]' \
- '(--no-subspecs)--no-subspecs[Lint skips validation of subspecs]' \
- '(--no-clean)--no-clean[Lint leaves the build directory intact for inspection]' \
- '*:script or directory:_files'
- )
- local -a _spec_cat_options
- _spec_cat_options=(
- '(--show-all)--show-all[Pick from all versions of the given podspec]'
- )
- local -a _spec_which_options
- _spec_which_options=(
- '(--show-all)--show-all[Print all versions of the given podspec]'
- )
- local -a _spec_edit_options
- _spec_edit_options=(
- '(--show-all)--show-all[Pick which spec to edit from all available versions of the given podspec]'
- )
- local -a _trunk_register_options
- _trunk_register_options=(
- '(--description=DESCRIPTION)--description=[An arbitrary description to easily identify your session later on.]'
- )
- __first_command_list ()
- {
- local expl
- declare -a tasks
- tasks=(install ipc list outdated podfile-info push repo search setup spec update)
- _wanted tasks expl 'help' compadd $tasks
- }
- __repo_list() {
- _wanted application expl 'repo' compadd $(command ls -1 ~/.cocoapods/repos 2>/dev/null | sed -e 's/ /\\ /g')
- }
- __pod-repo() {
- local curcontext="$curcontext" state line
- typeset -A opt_args
- _arguments -C \
- ':command:->command' \
- '*::options:->options'
- case $state in
- (command)
- _describe -t commands "pod repo" _repo_arguments
- return
- ;;
- (options)
- case $line[1] in
- (lint)
- _arguments \
- $_inherited_options \
- $_repo_lint_options \
- ':feature:__repo_list'
- ;;
- (update)
- _arguments \
- $_inherited_options \
- ':feature:__repo_list'
- ;;
- (push)
- _arguments \
- $_inherited_options \
- $_repo_push_options \
- ':feature:__repo_list'
- ;;
- (add)
- _arguments \
- $_inherited_options \
- $_repo_add_options
- (remove)
- _arguments \
- $_inherited_options \
- ':feature:__repo_list'
- ;;
- esac
- ;;
- esac
- }
- __pod-spec() {
- local curcontext="$curcontext" state line
- typeset -A opt_args
- _arguments -C \
- $_inherited_options \
- ':command:->command' \
- '*::options:->options'
- case $state in
- (command)
- _describe -t commands "pod spec" _spec_arguments
- return
- ;;
- (options)
- case $line[1] in
- (create)
- _arguments \
- $_inherited_options
- ;;
- (lint)
- _arguments \
- $_inherited_options \
- $_spec_lint_options
- ;;
- (cat)
- _arguments \
- $_inherited_options \
- $_spec_cat_options
- ;;
- (which)
- _arguments \
- $_inherited_options \
- $_spec_which_options
- ;;
- (edit)
- _arguments \
- $_inherited_options \
- $_spec_edit_options
- ;;
- esac
- return
- ;;
- esac
- }
- __pod-ipc() {
- local curcontext="$curcontext" state line
- typeset -A opt_args
- _arguments -C \
- ':command:->command' \
- '*::options:->options'
- case $state in
- (command)
- _describe -t commands "pod ipc" _ipc_arguments
- return
- ;;
- (options)
- _arguments -C \
- $_inherited_options
- return
- ;;
- esac
- }
- __pod-lib() {
- local curcontext="$curcontext" state line
- typeset -A opt_args
- _arguments -C \
- ':command:->command' \
- '*::options:->options'
- case $state in
- (command)
- _describe -t commands "pod lib" _lib_arguments
- return
- ;;
- (options)
- case $line[1] in
- (create)
- _arguments \
- $_inherited_options
- ;;
- (lint)
- _arguments \
- $_inherited_options \
- $_lib_lint_options
- ;;
- esac
- return
- ;;
- esac
- }
- __pod-plugins() {
- local curcontext="$curcontext" state line
- typeset -A opt_args
- _arguments -C \
- $_inherited_options \
- ':command:->command' \
- '*::options:->options'
- case $state in
- (command)
- _describe -t commands "pod plugins" _plugins_arguments
- return
- ;;
- (options)
- case $line[1] in
- (create)
- _arguments \
- $_inherited_options
- ;;
- (list)
- _arguments \
- $_inherited_options
- ;;
- (search)
- _arguments \
- $_inherited_options \
- $_plugins_search_options
- ;;
- esac
- return
- ;;
- esac
- }
- __pod-trunk() {
- local curcontext="$curcontext" state line
- typeset -A opt_args
- _arguments -C \
- $_inherited_options \
- ':command:->command' \
- '*::options:->options'
- case $state in
- (command)
- _describe -t commands "pod trunk" _trunk_arguments
- return
- ;;
- (options)
- case $line[1] in
- (add-owner)
- _arguments \
- $_inherited_options
- ;;
- (me)
- __pod-trunk-me
- ;;
- (push)
- _arguments \
- $_inherited_options
- ;;
- (register)
- _arguments \
- $_inherited_options \
- $_trunk_register_options
- ;;
- esac
- return
- ;;
- esac
- }
- __pod-trunk-me() {
- local curcontext="$curcontext" state line
- typeset -A opt_args
- _arguments -C \
- $_inherited_options \
- ':command:->command' \
- '*::options:->options'
- case $state in
- (command)
- _describe -t commands "pod trunk me" _trunk_me_arguments
- return
- ;;
- (options)
- case $line[1] in
- (clean-sessions)
- _arguments \
- $_inherited_options
- ;;
- esac
- return
- ;;
- esac
- }
- __pod-list() {
- local curcontext="$curcontext" state line
- typeset -A opt_args
- _arguments -C \
- $_inherited_options \
- $_list_options \
- ':command:->command' \
- '*::options:->options'
- case $state in
- (command)
- _describe -t commands "pod list" _list_arguments
- return
- ;;
- (options)
- _arguments -C \
- $_inherited_options \
- $_list_options
- return
- ;;
- esac
- }
- local curcontext="$curcontext" state line
- typeset -A opt_args
- _arguments -C \
- $_inherited_options \
- ':command:->command' \
- '*::options:->options'
- case $state in
- (command)
- _describe -t commands "pod" _1st_arguments
- _arguments \
- $_inherited_options \
- $_root_options
- return
- ;;
- (options)
- case $line[1] in
- (help)
- _arguments \
- $_inherited_options \
- ':help:__first_command_list'
- ;;
- (init)
- _arguments \
- $_inherited_options
- ;;
- (push)
- _arguments \
- $_inherited_options \
- $_repo_push_options \
- ':repo:__repo_list'
- ;;
- (repo)
- __pod-repo
- ;;
- (spec)
- __pod-spec
- ;;
- (ipc)
- __pod-ipc
- ;;
- (lib)
- __pod-lib
- ;;
- (list)
- __pod-list
- ;;
- (install)
- _arguments \
- $_inherited_options \
- $_install_options
- ;;
- (update)
- _arguments \
- $_inherited_options \
- $_update_options
- ;;
- (outdated)
- _arguments \
- $_inherited_options \
- $_outdated_options
- ;;
- (plugins)
- __pod-plugins
- ;;
- (trunk)
- __pod-trunk
- ;;
- (try)
- _arguments \
- $_inherited_options
- ;;
- (search)
- _arguments \
- $_inherited_options \
- $_search_options
- ;;
- (setup)
- _arguments \
- $_inherited_options \
- $_setup_options
- ;;
- esac
- ;;
- esac
|