_pod 22.9 KB
Newer Older
1
#compdef pod
Alexandre Joly's avatar
Alexandre Joly committed
2
#autoload
3
4
5
# setopt XTRACE VERBOSE
# vim: ft=zsh sw=2 ts=2 et

6
7

# -----------------------------------------------------------------------------
mekanics's avatar
mekanics committed
8
#          FILE:  _pod
9
#   DESCRIPTION:  Cocoapods (0.33.1) autocomplete plugin for Oh-My-Zsh
Alexandre Joly's avatar
Alexandre Joly committed
10
#                 http://cocoapods.org
11
#                 Generated with `pod --completion-script
12
13
#        AUTHOR:  Alexandre Joly (alexandre.joly@mekanics.ch)
#        GITHUB:  https://github.com/mekanics
Alexandre Joly's avatar
Alexandre Joly committed
14
#       TWITTER:  @jolyAlexandre
15
#       VERSION:  0.0.5
16
17
# -----------------------------------------------------------------------------

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
local -a _subcommands
local -a _options

case "$words[2]" in
  help)
    case "$words[3]" in
      *) # pod help
        _options=(
          "--help:Show help banner of specified command"
          "--no-ansi:Show output without ANSI codes"
          "--silent:Show nothing"
          "--verbose:Show more debugging information"
        )
        _describe -t options "pod help options" _options
      ;;
Alexandre Joly's avatar
Alexandre Joly committed
33
    esac
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
  ;;
  ipc)
    case "$words[3]" in
      list)
        case "$words[4]" in
          *) # pod ipc list
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod ipc list options" _options
          ;;
        esac
      ;;
      podfile)
        case "$words[4]" in
          *) # pod ipc podfile
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod ipc podfile options" _options
          ;;
        esac
      ;;
      repl)
        case "$words[4]" in
          *) # pod ipc repl
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod ipc repl options" _options
          ;;
        esac
      ;;
      spec)
        case "$words[4]" in
          *) # pod ipc spec
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod ipc spec options" _options
          ;;
        esac
      ;;
      update-search-index)
        case "$words[4]" in
          *) # pod ipc update-search-index
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod ipc update-search-index options" _options
          ;;
        esac
      ;;
      *) # pod ipc
        _subcommands=(
          "list:Lists the specifications known 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."
        )
        _describe -t commands "pod ipc subcommands" _subcommands
        _options=(
          "--help:Show help banner of specified command"
          "--no-ansi:Show output without ANSI codes"
          "--silent:Show nothing"
          "--verbose:Show more debugging information"
        )
        _describe -t options "pod ipc options" _options
      ;;
Alexandre Joly's avatar
Alexandre Joly committed
119
    esac
120
121
122
123
124
125
126
127
128
129
130
131
  ;;
  init)
    case "$words[3]" in
      *) # pod init
        _options=(
          "--help:Show help banner of specified command"
          "--no-ansi:Show output without ANSI codes"
          "--silent:Show nothing"
          "--verbose:Show more debugging information"
        )
        _describe -t options "pod init options" _options
      ;;
Alexandre Joly's avatar
Alexandre Joly committed
132
    esac
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
  ;;
  install)
    case "$words[3]" in
      *) # pod install
        _options=(
          "--help:Show help banner of specified command"
          "--no-ansi:Show output without ANSI codes"
          "--no-clean:Leave SCM dirs like \`.git\` and \`.svn\` intact after downloading"
          "--no-integrate:Skip integration of the Pods libraries in the Xcode project(s)"
          "--no-repo-update:Skip running \`pod repo update\` before install"
          "--silent:Show nothing"
          "--verbose:Show more debugging information"
        )
        _describe -t options "pod install options" _options
      ;;
148
    esac
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
  ;;
  lib)
    case "$words[3]" in
      create)
        case "$words[4]" in
          *) # pod lib create
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod lib create options" _options
          ;;
        esac
      ;;
      lint)
        case "$words[4]" in
          *) # pod lib lint
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--no-clean:Lint leaves the build directory intact for inspection"
              "--no-subspecs:Lint skips validation of subspecs"
              "--only-errors:Lint validates even if warnings are present"
              "--quick:Lint skips checks that would require to download and build the spec"
              "--silent:Show nothing"
              "--subspec=NAME:Lint validates only the given subspec"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod lib lint options" _options
          ;;
        esac
      ;;
      *) # pod lib
        _subcommands=(
          "create:Creates a new Pod"
          "lint:Validates a Pod"
        )
        _describe -t commands "pod lib subcommands" _subcommands
        _options=(
          "--help:Show help banner of specified command"
          "--no-ansi:Show output without ANSI codes"
          "--silent:Show nothing"
          "--verbose:Show more debugging information"
        )
        _describe -t options "pod lib options" _options
      ;;
197
    esac
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
  ;;
  list)
    case "$words[3]" in
      new)
        case "$words[4]" in
          *) # pod list new
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--silent:Show nothing"
              "--update:Run \`pod repo update\` before listing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod list new options" _options
          ;;
        esac
      ;;
      *) # pod list
        _subcommands=(
          "new:Lists pods introduced in the master spec-repo since the last check"
        )
        _describe -t commands "pod list subcommands" _subcommands
        _options=(
          "--help:Show help banner of specified command"
          "--no-ansi:Show output without ANSI codes"
          "--silent:Show nothing"
          "--update:Run \`pod repo update\` before listing"
          "--verbose:Show more debugging information"
        )
        _describe -t options "pod list options" _options
      ;;
229
    esac
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
  ;;
  outdated)
    case "$words[3]" in
      *) # pod outdated
        _options=(
          "--help:Show help banner of specified command"
          "--no-ansi:Show output without ANSI codes"
          "--no-repo-update:Skip running \`pod repo update\` before install"
          "--silent:Show nothing"
          "--verbose:Show more debugging information"
        )
        _describe -t options "pod outdated options" _options
      ;;
    esac
  ;;
  plugins)
    case "$words[3]" in
      create)
        case "$words[4]" in
          *) # pod plugins create
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod plugins create options" _options
          ;;
        esac
      ;;
      list)
        case "$words[4]" in
          *) # pod plugins list
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod plugins list options" _options
          ;;
        esac
      ;;
      search)
        case "$words[4]" in
          *) # pod plugins search
            _options=(
              "--full:Search by name, author, and description"
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod plugins search options" _options
          ;;
        esac
      ;;
      *) # pod plugins
        _subcommands=(
          "create:Creates a new plugin"
          "list:List all known plugins"
          "search:Search for known plugins"
        )
        _describe -t commands "pod plugins subcommands" _subcommands
        _options=(
          "--help:Show help banner of specified command"
          "--no-ansi:Show output without ANSI codes"
          "--silent:Show nothing"
          "--verbose:Show more debugging information"
        )
        _describe -t options "pod plugins options" _options
      ;;
    esac
  ;;
  push)
    case "$words[3]" in
      *) # pod push
        _options=(
          "--help:Show help banner of specified command"
          "--no-ansi:Show output without ANSI codes"
          "--silent:Show nothing"
          "--verbose:Show more debugging information"
        )
        _describe -t options "pod push options" _options
      ;;
    esac
  ;;
  repo)
    case "$words[3]" in
      add)
        case "$words[4]" in
          *) # pod repo add
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--shallow:Create a shallow clone (fast clone, but no push capabilities)"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod repo add options" _options
          ;;
        esac
      ;;
      lint)
        case "$words[4]" in
          *) # pod repo lint
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--only-errors:Lint presents only the errors"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod repo lint options" _options
          ;;
        esac
      ;;
      push)
        case "$words[4]" in
          *) # pod repo push
            _options=(
              "--allow-warnings:Allows pushing even if there are warnings"
              "--help:Show help banner of specified command"
              "--local-only:Does not perform the step of pushing REPO to its remote"
              "--no-ansi:Show output without ANSI codes"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod repo push options" _options
          ;;
        esac
      ;;
      remove)
        case "$words[4]" in
          *) # pod repo remove
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod repo remove options" _options
          ;;
        esac
      ;;
      update)
        case "$words[4]" in
          *) # pod repo update
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod repo update options" _options
          ;;
        esac
      ;;
      *) # pod repo
        _subcommands=(
          "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."
        )
        _describe -t commands "pod repo subcommands" _subcommands
        _options=(
          "--help:Show help banner of specified command"
          "--no-ansi:Show output without ANSI codes"
          "--silent:Show nothing"
          "--verbose:Show more debugging information"
        )
        _describe -t options "pod repo options" _options
      ;;
    esac
  ;;
  search)
    case "$words[3]" in
      *) # pod search
        _options=(
          "--full:Search by name, summary, and description"
          "--help:Show help banner of specified command"
          "--ios:Restricts the search to Pods supported on iOS"
          "--no-ansi:Show output without ANSI codes"
          "--osx:Restricts the search to Pods supported on OS X"
          "--stats:Show additional stats (like GitHub watchers and forks)"
          "--verbose:Show more debugging information"
          "--web:Searches on cocoapods.org"
        )
        _describe -t options "pod search options" _options
      ;;
    esac
  ;;
  setup)
    case "$words[3]" in
      *) # pod setup
        _options=(
          "--help:Show help banner of specified command"
          "--no-ansi:Show output without ANSI codes"
          "--no-shallow:Clone full history so push will work"
          "--push:Use this option to enable push access once granted"
          "--silent:Show nothing"
          "--verbose:Show more debugging information"
        )
        _describe -t options "pod setup options" _options
      ;;
    esac
  ;;
  spec)
    case "$words[3]" in
      cat)
        case "$words[4]" in
          *) # pod spec cat
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--show-all:Pick from all versions of the given podspec"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod spec cat options" _options
          ;;
        esac
      ;;
      create)
        case "$words[4]" in
          *) # pod spec create
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod spec create options" _options
          ;;
        esac
      ;;
      edit)
        case "$words[4]" in
          *) # pod spec edit
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--show-all:Pick which spec to edit from all available versions of the given podspec"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod spec edit options" _options
          ;;
        esac
      ;;
      lint)
        case "$words[4]" in
          *) # pod spec lint
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--no-clean:Lint leaves the build directory intact for inspection"
              "--no-subspecs:Lint skips validation of subspecs"
              "--only-errors:Lint validates even if warnings are present"
              "--quick:Lint skips checks that would require to download and build the spec"
              "--silent:Show nothing"
              "--subspec=NAME:Lint validates only the given subspec"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod spec lint options" _options
          ;;
        esac
      ;;
      which)
        case "$words[4]" in
          *) # pod spec which
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--show-all:Print all versions of the given podspec"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod spec which options" _options
          ;;
        esac
      ;;
      *) # pod spec
        _subcommands=(
          "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."
        )
        _describe -t commands "pod spec subcommands" _subcommands
        _options=(
          "--help:Show help banner of specified command"
          "--no-ansi:Show output without ANSI codes"
          "--silent:Show nothing"
          "--verbose:Show more debugging information"
        )
        _describe -t options "pod spec options" _options
      ;;
    esac
  ;;
  trunk)
    case "$words[3]" in
      add-owner)
        case "$words[4]" in
          *) # pod trunk add-owner
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod trunk add-owner options" _options
          ;;
        esac
      ;;
      me)
        case "$words[4]" in
          clean-sessions)
            case "$words[5]" in
              *) # pod trunk me clean-sessions
                _options=(
                  "--all:Removes all your sessions, except for the current one"
                  "--help:Show help banner of specified command"
                  "--no-ansi:Show output without ANSI codes"
                  "--silent:Show nothing"
                  "--verbose:Show more debugging information"
                )
                _describe -t options "pod trunk me clean-sessions options" _options
              ;;
560
            esac
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
          ;;
          *) # pod trunk me
            _subcommands=(
              "clean-sessions:Remove sessions"
            )
            _describe -t commands "pod trunk me subcommands" _subcommands
            _options=(
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod trunk me options" _options
          ;;
        esac
      ;;
      push)
        case "$words[4]" in
          *) # pod trunk push
            _options=(
              "--allow-warnings:Allows push even if there are lint warnings"
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod trunk push options" _options
          ;;
        esac
      ;;
      register)
        case "$words[4]" in
          *) # pod trunk register
            _options=(
              "--description=DESCRIPTION:An arbitrary description to easily identify your session later on."
              "--help:Show help banner of specified command"
              "--no-ansi:Show output without ANSI codes"
              "--silent:Show nothing"
              "--verbose:Show more debugging information"
            )
            _describe -t options "pod trunk register options" _options
          ;;
        esac
      ;;
      *) # pod trunk
        _subcommands=(
          "add-owner:Add an owner to a pod"
          "me:Display information about your sessions"
          "push:Publish a podspec"
          "register:Manage sessions"
        )
        _describe -t commands "pod trunk subcommands" _subcommands
        _options=(
          "--help:Show help banner of specified command"
          "--no-ansi:Show output without ANSI codes"
          "--silent:Show nothing"
          "--verbose:Show more debugging information"
        )
        _describe -t options "pod trunk options" _options
      ;;
621
    esac
622
623
624
625
626
627
628
629
630
631
632
633
  ;;
  try)
    case "$words[3]" in
      *) # pod try
        _options=(
          "--help:Show help banner of specified command"
          "--no-ansi:Show output without ANSI codes"
          "--silent:Show nothing"
          "--verbose:Show more debugging information"
        )
        _describe -t options "pod try options" _options
      ;;
Alexandre Joly's avatar
Alexandre Joly committed
634
    esac
Alexandre Joly's avatar
Alexandre Joly committed
635
  ;;
636
637
638
639
640
641
642
643
644
645
646
647
648
649
  update)
    case "$words[3]" in
      *) # pod update
        _options=(
          "--help:Show help banner of specified command"
          "--no-ansi:Show output without ANSI codes"
          "--no-clean:Leave SCM dirs like \`.git\` and \`.svn\` intact after downloading"
          "--no-integrate:Skip integration of the Pods libraries in the Xcode project(s)"
          "--no-repo-update:Skip running \`pod repo update\` before install"
          "--silent:Show nothing"
          "--verbose:Show more debugging information"
        )
        _describe -t options "pod update options" _options
      ;;
Alexandre Joly's avatar
Alexandre Joly committed
650
651
    esac
  ;;
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
  *) # pod
    _subcommands=(
      "help:Show help for the given command."
      "ipc:Inter-process communication"
      "init:Generate a Podfile for the current directory."
      "install:Install project dependencies"
      "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 the CocoaPods API (e.g. publishing new specs)"
      "try:Try a Pod!"
      "update:Update outdated project dependencies"
    )
    _describe -t commands "pod subcommands" _subcommands
    _options=(
      "--completion-script:Print the auto-completion script"
      "--help:Show help banner of specified command"
      "--no-ansi:Show output without ANSI codes"
      "--silent:Show nothing"
      "--verbose:Show more debugging information"
      "--version:Show the version of the tool"
    )
    _describe -t options "pod options" _options
  ;;
Alexandre Joly's avatar
Alexandre Joly committed
682
esac