diff options
author | Alexandre Joly <alexandre.joly@mekanics.ch> | 2013-07-05 00:58:05 +0200 |
---|---|---|
committer | Alexandre Joly <alexandre.joly@mekanics.ch> | 2013-07-05 00:58:05 +0200 |
commit | c26facb582eed3b63642665864258862aa49392b (patch) | |
tree | 14457bcc9a71d3bf6f1bd175b439b5dc6fccbbe8 /plugins/pod | |
parent | b0e4381471f8df192b7ef74b10039cc9687a6f54 (diff) | |
download | zsh-c26facb582eed3b63642665864258862aa49392b.tar.gz zsh-c26facb582eed3b63642665864258862aa49392b.tar.bz2 zsh-c26facb582eed3b63642665864258862aa49392b.zip |
first few lines for the autocompletion of cocoapods
Diffstat (limited to 'plugins/pod')
-rw-r--r-- | plugins/pod/_pod | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/plugins/pod/_pod b/plugins/pod/_pod new file mode 100644 index 000000000..2c183635d --- /dev/null +++ b/plugins/pod/_pod @@ -0,0 +1,82 @@ +#compdef pod + +# ----------------------------------------------------------------------------- +# FILE: pod.plugin.zsh +# DESCRIPTION: Cocoapods autocomplete plugin for Oh-My-Zsh +# AUTHOR: Alexandre Joly (alexandre.joly@mekanics.ch) +# GITHUB: https://github.com/mekanics +# VERSION: 0.0.1 +# ----------------------------------------------------------------------------- + +_pod_all_repos() { + repos=(`ls ~/.cocoapods`) +} + +local -a _1st_arguments +_1st_arguments=( + 'help:Show help for the given command.' + 'install:Install project dependencies' + 'ipc:Inter-process communication' + 'lib:Develop pods' + 'list:List pods' + 'outdated:Show outdated project dependencies' + 'podfile-info:Shows information on installed Pods' + 'push:Push new specifications to a spec-repo' + 'repo:Manage spec-repositories' + 'search:Searches for pods' + 'setup:Setup the CocoaPods environment' + 'spec:Manage pod specs' + 'update:Update outdated project dependencies' +) + +_arguments '*:: :->command' + +if (( CURRENT == 1 )); then + _describe -t commands "pod command" _1st_arguments + return +fi + +local -a _command_args +case "$words[1]" in + install) + _command_args=( + '(--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]' + ) + ;; + update) + _command_args=( + '(--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]' + ) + ;; + outdated) + _command_args=( + '(--no-repo-update)--no-repo-update[Skip running `pod repo update before install]' + ) + ;; + search) + _command_args=( + '(--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]' + ) + ;; + update) + _command_args=( + '(--update)--update[Run `pod repo update before listing]' + ) + ;; +esac + +_arguments \ + $_command_args \ + '(--silent)--silent[Show nothing]' \ + '(--version)--version[Show the version of CocoaPods]' \ + '(--no-color)--no-color[Show output without color]' \ + '(--verbose)--verbose[Show more debugging information]' \ + '(--help)--help[Show help banner of specified command]' \ + && return 0
\ No newline at end of file |