cf5ca2f4f3e6d98a4d4d4938be0e421645722fb2
- Author
- Alexandre Joly <alexandre.joly@futurecom.ch>
- Committer
- Alexandre Joly <alexandre.joly@futurecom.ch>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/plugins/pod/_pod b/plugins/pod/_pod
2index 2c183635dc53e4692d74e2d855116b373c3ca71b..ce8882d421ead3fff45db3e79b0919cbe952a905 100644
3--- a/plugins/pod/_pod
4+++ b/plugins/pod/_pod
5@@ -1,16 +1,29 @@
6 #compdef pod
7+#autoload
8
9 # -----------------------------------------------------------------------------
10 # FILE: pod.plugin.zsh
11 # DESCRIPTION: Cocoapods autocomplete plugin for Oh-My-Zsh
12+# http://cocoapods.org
13 # AUTHOR: Alexandre Joly (alexandre.joly@mekanics.ch)
14 # GITHUB: https://github.com/mekanics
15+# TWITTER: @jolyAlexandre
16 # VERSION: 0.0.1
17+# LICENSE: MIT
18 # -----------------------------------------------------------------------------
19
20-_pod_all_repos() {
21- repos=(`ls ~/.cocoapods`)
22-}
23+#------------------
24+# TODO:
25+# - Parameters for
26+# - install
27+# - update
28+# - outdated
29+# - search
30+# - list
31+# - push
32+# - podfile-info
33+# - setup
34+#------------------
35
36 local -a _1st_arguments
37 _1st_arguments=(
38@@ -29,54 +42,158 @@ _1st_arguments=(
39 'update:Update outdated project dependencies'
40 )
41
42-_arguments '*:: :->command'
43-
44-if (( CURRENT == 1 )); then
45- _describe -t commands "pod command" _1st_arguments
46- return
47-fi
48-
49-local -a _command_args
50-case "$words[1]" in
51- install)
52- _command_args=(
53- '(--no-clean)--no-clean[Leave SCM dirs like `.git` and `.svn` intact after downloading]' \
54- '(--no-integrate)--no-integrate[Skip integration of the Pods libraries in the Xcode project(s)]' \
55- '(--no-repo-update)--no-repo-update[Skip running `pod repo update before install]'
56- )
57- ;;
58- update)
59- _command_args=(
60- '(--no-clean)--no-clean[Leave SCM dirs like `.git` and `.svn intact after downloading]' \
61- '(--no-integrate)--no-integrate[Skip integration of the Pods libraries in the Xcode project(s)]' \
62- '(--no-repo-update)--no-repo-update[Skip running `pod repo update before install]'
63- )
64- ;;
65- outdated)
66- _command_args=(
67- '(--no-repo-update)--no-repo-update[Skip running `pod repo update before install]'
68- )
69- ;;
70- search)
71- _command_args=(
72- '(--full)--full[Search by name, summary, and description]' \
73- '(--stats)--stats[Show additional stats (like GitHub watchers and forks)]' \
74- '(--ios)--ios[Restricts the search to Pods supported on iOS]' \
75- '(--osx)--osx[Restricts the search to Pods supported on OS X]'
76- )
77- ;;
78- update)
79- _command_args=(
80- '(--update)--update[Run `pod repo update before listing]'
81- )
82- ;;
83-esac
84+local -a _repo_arguments
85+_repo_arguments=(
86+ 'add:Add a spec repo'
87+ 'lint:Validates all specs in a repo'
88+ 'update:Update a spec repo'
89+)
90+
91+local -a _spec_arguments
92+_spec_arguments=(
93+ 'cat:Prints a spec file'
94+ 'create:Create spec file stub'
95+ 'edit:Edit a spec file'
96+ 'lint:Validates a spec file'
97+ 'which:Prints the path of the given spec'
98+)
99+
100+local -a _ipc_arguments
101+_ipc_arguments=(
102+ 'list:Lists the specifications know to CocoaPods'
103+ 'podfile:Converts a Podfile to YAML'
104+ 'repl:The repl listens to commands on standard input'