c26facb582eed3b63642665864258862aa49392b

Author
Alexandre Joly <alexandre.joly@mekanics.ch>
Committer
Alexandre Joly <alexandre.joly@mekanics.ch>
Date

Message

first few lines for the autocompletion of cocoapods

Diff

 1diff --git a/plugins/pod/_pod b/plugins/pod/_pod
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..2c183635dc53e4692d74e2d855116b373c3ca71b
 4--- /dev/null
 5+++ b/plugins/pod/_pod
 6@@ -0,0 +1,82 @@
 7+#compdef pod
 8+
 9+# -----------------------------------------------------------------------------
10+#          FILE:  pod.plugin.zsh
11+#   DESCRIPTION:  Cocoapods autocomplete plugin for Oh-My-Zsh
12+#        AUTHOR:  Alexandre Joly (alexandre.joly@mekanics.ch)
13+#        GITHUB:  https://github.com/mekanics
14+#       VERSION:  0.0.1
15+# -----------------------------------------------------------------------------
16+
17+_pod_all_repos() {
18+    repos=(`ls ~/.cocoapods`)
19+}
20+
21+local -a _1st_arguments
22+_1st_arguments=(
23+    'help:Show help for the given command.'
24+    'install:Install project dependencies'
25+    'ipc:Inter-process communication'
26+    'lib:Develop pods'
27+    'list:List pods'
28+    'outdated:Show outdated project dependencies'
29+    'podfile-info:Shows information on installed Pods'
30+    'push:Push new specifications to a spec-repo'
31+    'repo:Manage spec-repositories'
32+    'search:Searches for pods'
33+    'setup:Setup the CocoaPods environment'
34+    'spec:Manage pod specs'
35+    'update:Update outdated project dependencies'
36+)
37+
38+_arguments '*:: :->command'
39+
40+if (( CURRENT == 1 )); then
41+  _describe -t commands "pod command" _1st_arguments
42+  return
43+fi
44+
45+local -a _command_args
46+case "$words[1]" in
47+    install)
48+    _command_args=(
49+        '(--no-clean)--no-clean[Leave SCM dirs like `.git` and `.svn` intact after downloading]' \
50+        '(--no-integrate)--no-integrate[Skip integration of the Pods libraries in the Xcode project(s)]' \
51+        '(--no-repo-update)--no-repo-update[Skip running `pod repo update before install]'
52+    )
53+    ;;
54+    update)
55+    _command_args=(
56+        '(--no-clean)--no-clean[Leave SCM dirs like `.git` and `.svn intact after downloading]' \
57+        '(--no-integrate)--no-integrate[Skip integration of the Pods libraries in the Xcode project(s)]' \
58+        '(--no-repo-update)--no-repo-update[Skip running `pod repo update before install]'
59+    )
60+    ;;
61+    outdated)
62+    _command_args=(
63+        '(--no-repo-update)--no-repo-update[Skip running `pod repo update before install]'
64+    )
65+    ;;
66+    search)
67+    _command_args=(
68+        '(--full)--full[Search by name, summary, and description]' \
69+        '(--stats)--stats[Show additional stats (like GitHub watchers and forks)]' \
70+        '(--ios)--ios[Restricts the search to Pods supported on iOS]' \
71+        '(--osx)--osx[Restricts the search to Pods supported on OS X]'
72+    )
73+    ;;
74+    update)
75+    _command_args=(
76+        '(--update)--update[Run `pod repo update before listing]'
77+    )
78+    ;;
79+esac
80+
81+_arguments \
82+    $_command_args \
83+    '(--silent)--silent[Show nothing]' \
84+    '(--version)--version[Show the version of CocoaPods]' \
85+    '(--no-color)--no-color[Show output without color]' \
86+    '(--verbose)--verbose[Show more debugging information]' \
87+    '(--help)--help[Show help banner of specified command]' \
88+    &&  return 0