/
_brew
2078 lines (1935 loc) 路 109 KB
/
_brew
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
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
197
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
229
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
560
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
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
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
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#compdef brew
#autoload
# Brew ZSH completion function
# This file is automatically generated by running `brew generate-man-completions`.
# See Library/Homebrew/completions/zsh.erb for editing instructions.
# functions starting with __brew are helper functions that complete or list
# various types of items.
# functions starting with _brew_ are completions for brew commands
# this mechanism can be extended by external commands by defining a function
# named _brew_<external-name>. See _brew_cask for an example of this.
# a list of aliased internal commands
__brew_list_aliases() {
local -a aliases
aliases=(
ls list
homepage home
'-S' search
up update
ln link
instal install
uninstal uninstall
rm uninstall
remove uninstall
abv info
dr doctor
'--repo' '--repository'
environment '--env'
'--config' config
'-v' '--version'
lc livecheck
tc typecheck
)
echo "${aliases}"
}
__brew_formulae_or_ruby_files() {
_alternative 'files:files:{_files -g "*.rb"}'
}
# completions remain in cache until any tap has new commits
__brew_completion_caching_policy() {
local -a tmp
# invalidate if cache file is missing or >=2 weeks old
tmp=( $1(mw-2N) )
(( $#tmp )) || return 0
# otherwise, invalidate if latest tap index file is missing or newer than cache file
tmp=( $(brew --repository)/Library/Taps/*/*/.git/index(om[1]N) )
[[ -z $tmp || $tmp -nt $1 ]]
}
__brew_formulae() {
[[ -prefix '-' ]] && return 0
local -a list
local comp_cachename=brew_formulae
if ! _retrieve_cache $comp_cachename; then
list=( $(brew formulae) )
_store_cache $comp_cachename list
fi
_describe -t formulae 'all formulae' list
}
__brew_installed_formulae() {
[[ -prefix '-' ]] && return 0
local -a formulae
formulae=($(brew list --formula))
_describe -t formulae 'installed formulae' formulae
}
__brew_outdated_formulae() {
[[ -prefix '-' ]] && return 0
local -a formulae
formulae=($(brew outdated --formula))
_describe -t formulae 'outdated formulae' formulae
}
__brew_casks() {
[[ -prefix '-' ]] && return 0
local -a list
local expl
local comp_cachename=brew_casks
if ! _retrieve_cache $comp_cachename; then
list=( $(brew casks) )
_store_cache $comp_cachename list
fi
_wanted list expl 'all casks' compadd -a list
}
__brew_installed_casks() {
[[ -prefix '-' ]] && return 0
local -a list
local expl
list=( $(brew list --cask) )
_wanted list expl 'installed casks' compadd -a list
}
__brew_outdated_casks() {
[[ -prefix '-' ]] && return 0
local -a casks
casks=($(brew outdated --cask))
_describe -t casks 'outdated casks' casks
}
__brew_installed_taps() {
[[ -prefix '-' ]] && return 0
local -a taps
taps=($(brew tap))
_describe -t installed-taps 'installed taps' taps
}
__brew_any_tap() {
[[ -prefix '-' ]] && return 0
_alternative \
'installed-taps:installed taps:__brew_installed_taps'
}
__brew_internal_commands() {
local -a commands
commands=(
'--cache:Display Homebrew'\''s download cache'
'--caskroom:Display Homebrew'\''s Caskroom path'
'--cellar:Display Homebrew'\''s Cellar path'
'--env:Summarise Homebrew'\''s build environment as a plain list'
'--prefix:Display Homebrew'\''s install path'
'--repository:Display where Homebrew'\''s git repository is located'
'--version:Print the version numbers of Homebrew, Homebrew/homebrew-core and Homebrew/homebrew-cask (if tapped) to standard output'
'analytics:Control Homebrew'\''s anonymous aggregate user behaviour analytics'
'audit:Check formula for Homebrew coding style violations'
'autoremove:Uninstall formulae that were only installed as a dependency of another formula and are now no longer needed'
'bottle:Generate a bottle (binary package) from a formula that was installed with `--build-bottle`'
'bump:Display out-of-date brew formulae and the latest version available'
'bump-cask-pr:Create a pull request to update cask with a new version'
'bump-formula-pr:Create a pull request to update formula with a new URL or a new tag'
'bump-revision:Create a commit to increment the revision of formula'
'bump-unversioned-casks:Check all casks with unversioned URLs in a given tap for updates'
'casks:List all locally installable casks including short names'
'cat:Display the source of a formula or cask'
'cleanup:Remove stale lock files and outdated downloads for all formulae and casks, and remove old versions of installed formulae'
'command:Display the path to the file being used when invoking `brew` cmd'
'commands:Show lists of built-in and external commands'
'completions:Control whether Homebrew automatically links external tap shell completion files'
'config:Show Homebrew and system configuration info useful for debugging'
'contributions:Contributions to Homebrew repos'
'create:Generate a formula or, with `--cask`, a cask for the downloadable file at URL and open it in the editor'
'deps:Show dependencies for formula'
'desc:Display formula'\''s name and one-line description'
'developer:Control Homebrew'\''s developer mode'
'dispatch-build-bottle:Build bottles for these formulae with GitHub Actions'
'docs:Open Homebrew'\''s online documentation (https://docs'
'doctor:Check your system for potential problems'
'edit:Open a formula or cask in the editor set by `EDITOR` or `HOMEBREW_EDITOR`, or open the Homebrew repository for editing if no formula is provided'
'extract:Look through repository history to find the most recent version of formula and create a copy in tap'
'fetch:Download a bottle (if available) or source packages for formulae and binaries for casks'
'formula:Display the path where formula is located'
'formulae:List all locally installable formulae including short names'
'generate-cask-api:Generates Cask API data files for formulae'
'generate-formula-api:Generates Formula API data files for formulae'
'generate-man-completions:Generate Homebrew'\''s manpages and shell completions'
'gist-logs:Upload logs for a failed build of formula to a new Gist'
'home:Open a formula or cask'\''s homepage in a browser, or open Homebrew'\''s own homepage if no argument is provided'
'info:Display brief statistics for your Homebrew installation'
'install:Install a formula or cask'
'install-bundler-gems:Install Homebrew'\''s Bundler gems'
'irb:Enter the interactive Homebrew Ruby shell'
'leaves:List installed formulae that are not dependencies of another installed formula'
'link:Symlink all of formula'\''s installed files into Homebrew'\''s prefix'
'linkage:Check the library links from the given formula kegs'
'list:List all installed formulae and casks'
'livecheck:Check for newer versions of formulae and/or casks from upstream'
'log:Show the `git log` for formula or cask, or show the log for the Homebrew repository if no formula or cask is provided'
'migrate:Migrate renamed packages to new names, where formula are old names of packages'
'missing:Check the given formula kegs for missing dependencies'
'options:Show install options specific to formula'
'outdated:List installed casks and formulae that have an updated version available'
'pin:Pin the specified formula, preventing them from being upgraded when issuing the `brew upgrade` formula command'
'postinstall:Rerun the post-install steps for formula'
'pr-automerge:Find pull requests that can be automatically merged using `brew pr-publish`'
'pr-publish:Publish bottles for a pull request with GitHub Actions'
'pr-pull:Download and publish bottles, and apply the bottle commit from a pull request with artifacts generated by GitHub Actions'
'pr-upload:Apply the bottle commit and publish bottles to a host'
'prof:Run Homebrew with a Ruby profiler'
'readall:Import all items from the specified tap, or from all installed taps if none is provided'
'reinstall:Uninstall and then reinstall a formula or cask using the same options it was originally installed with, plus any appended options specific to a formula'
'release:Create a new draft Homebrew/brew release with the appropriate version number and release notes'
'rubocop:Installs, configures and runs Homebrew'\''s `rubocop`'
'ruby:Run a Ruby instance with Homebrew'\''s libraries loaded'
'search:Perform a substring search of cask tokens and formula names for text'
'sh:Enter an interactive shell for Homebrew'\''s build environment'
'shellenv:Print export statements'
'style:Check formulae or files for conformance to Homebrew style guidelines'
'tap:Tap a formula repository'
'tap-info:Show detailed information about one or more taps'
'tap-new:Generate the template files for a new tap'
'test:Run the test method provided by an installed formula'
'tests:Run Homebrew'\''s unit and integration tests'
'typecheck:Check for typechecking errors using Sorbet'
'unbottled:Show the unbottled dependents of formulae'
'uninstall:Uninstall a formula or cask'
'unlink:Remove symlinks for formula from Homebrew'\''s prefix'
'unpack:Unpack the source files for formula into subdirectories of the current working directory'
'unpin:Unpin formula, allowing them to be upgraded by `brew upgrade` formula'
'untap:Remove a tapped formula repository'
'update:Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1) and perform any necessary migrations'
'update-license-data:Update SPDX license data in the Homebrew repository'
'update-maintainers:Update the list of maintainers in the `Homebrew/brew` README'
'update-python-resources:Update versions for PyPI resource blocks in formula'
'update-report:The Ruby implementation of `brew update`'
'update-reset:Fetch and reset Homebrew and all tap repositories (or any specified repository) using `git`(1) to their latest `origin/HEAD`'
'update-sponsors:Update the list of GitHub Sponsors in the `Homebrew/brew` README'
'update-test:Run a test of `brew update` with a new repository clone'
'upgrade:Upgrade outdated casks and outdated, unpinned formulae using the same options they were originally installed with, plus any appended brew formula options'
'uses:Show formulae and casks that specify formula as a dependency; that is, show dependents of formula'
'vendor-gems:Install and commit Homebrew'\''s vendored gems'
'vendor-install:Install Homebrew'\''s portable Ruby'
)
_describe -t internal-commands 'internal commands' commands
}
__brew_external_commands() {
local -a list
local comp_cachename=brew_all_commands
if ! _retrieve_cache $comp_cachename; then
local cache_dir=$(brew --cache)
[[ -f $cache_dir/external_commands_list.txt ]] &&
list=( $(<$cache_dir/external_commands_list.txt) )
_store_cache $comp_cachename list
fi
_describe -t all-commands 'all commands' list
}
__brew_commands() {
_alternative \
'internal-commands:command:__brew_internal_commands' \
'external-commands:command:__brew_external_commands'
}
__brew_diagnostic_checks() {
local -a diagnostic_checks
diagnostic_checks=($(brew doctor --list-checks))
_describe -t diagnostic-checks 'diagnostic checks' diagnostic_checks
}
# brew --cache
_brew___cache() {
_arguments \
'(--build-from-source --force-bottle --bottle-tag --cask)--HEAD[Show the cache file used when building from HEAD]' \
'(--build-from-source --force-bottle --HEAD --cask)--bottle-tag[Show the cache file used when pouring a bottle for the given tag]' \
'(--force-bottle --bottle-tag --HEAD --cask)--build-from-source[Show the cache file used when building from source]' \
'--debug[Display any debugging information]' \
'(--build-from-source --bottle-tag --HEAD --cask)--force-bottle[Show the cache file used when pouring a bottle]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- formula \
'(--cask)--formula[Only show cache files for formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--build-from-source --force-bottle --bottle-tag --HEAD --formula)--cask[Only show cache files for casks]' \
'*::cask:__brew_casks'
}
# brew --caskroom
_brew___caskroom() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- cask \
'*::cask:__brew_casks'
}
# brew --cellar
_brew___cellar() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- formula \
'*::formula:__brew_formulae'
}
# brew --config
_brew___config() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
# brew --env
_brew___env() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--plain[Generate plain output even when piped]' \
'--quiet[Make some output more quiet]' \
'--shell[Generate a list of environment variables for the specified shell, or `--shell=auto` to detect the current shell]' \
'--verbose[Make some output more verbose]' \
- formula \
'*::formula:__brew_formulae'
}
# brew --prefix
_brew___prefix() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'(--unbrewed)--installed[Outputs nothing and returns a failing status code if formula is not installed]' \
'--quiet[Make some output more quiet]' \
'(--installed)--unbrewed[List files in Homebrew'\''s prefix not installed by Homebrew]' \
'--verbose[Make some output more verbose]' \
- formula \
'*::formula:__brew_formulae'
}
# brew --repo
_brew___repo() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- tap \
'*::tap:__brew_any_tap'
}
# brew --repository
_brew___repository() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- tap \
'*::tap:__brew_any_tap'
}
# brew -S
_brew__s() {
_arguments \
'(--repology --macports --fink --opensuse --fedora --debian --ubuntu)--archlinux[Search for text in the given database]' \
'--cask[Search online and locally for casks]' \
'(--open)--closed[Search for only closed GitHub pull requests]' \
'(--repology --macports --fink --opensuse --fedora --archlinux --ubuntu)--debian[Search for text in the given database]' \
'--debug[Display any debugging information]' \
'(--pull-request)--desc[Search for formulae with a description matching text and casks with a name or description matching text]' \
'--eval-all[Evaluate all available formulae and casks, whether installed or not, to search their descriptions. Implied if `HOMEBREW_EVAL_ALL` is set]' \
'(--repology --macports --fink --opensuse --archlinux --debian --ubuntu)--fedora[Search for text in the given database]' \
'(--repology --macports --opensuse --fedora --archlinux --debian --ubuntu)--fink[Search for text in the given database]' \
'--formula[Search online and locally for formulae]' \
'--help[Show this message]' \
'(--repology --fink --opensuse --fedora --archlinux --debian --ubuntu)--macports[Search for text in the given database]' \
'(--closed)--open[Search for only open GitHub pull requests]' \
'(--repology --macports --fink --fedora --archlinux --debian --ubuntu)--opensuse[Search for text in the given database]' \
'(--desc)--pull-request[Search for GitHub pull requests containing text]' \
'--quiet[Make some output more quiet]' \
'(--macports --fink --opensuse --fedora --archlinux --debian --ubuntu)--repology[Search for text in the given database]' \
'(--repology --macports --fink --opensuse --fedora --archlinux --debian)--ubuntu[Search for text in the given database]' \
'--verbose[Make some output more verbose]'
}
# brew abv
_brew_abv() {
_arguments \
'--analytics[List global Homebrew analytics data or, if specified, installation and build error data for formula (provided neither `HOMEBREW_NO_ANALYTICS` nor `HOMEBREW_NO_GITHUB_API` are set)]' \
'--category[Which type of analytics data to retrieve. The value for category must be `install`, `install-on-request` or `build-error`; `cask-install` or `os-version` may be specified if formula is not. The default is `install`]' \
'--days[How many days of analytics data to retrieve. The value for days must be `30`, `90` or `365`. The default is `30`]' \
'--debug[Display any debugging information]' \
'(--installed)--eval-all[Evaluate all available formulae and casks, whether installed or not, to print their JSON. Implied if `HOMEBREW_EVAL_ALL` is set]' \
'--github[Open the GitHub source page for formula and cask in a browser. To view the history locally: `brew log -p` formula or cask]' \
'--help[Show this message]' \
'(--eval-all --all)--installed[Print JSON of formulae that are currently installed]' \
'--json[Print a JSON representation. Currently the default value for version is `v1` for formula. For formula and cask use `v2`. See the docs for examples of using the JSON output: https://docs.brew.sh/Querying-Brew]' \
'--quiet[Make some output more quiet]' \
'--variations[Include the variations hash in each formula'\''s JSON output]' \
'--verbose[Show more verbose analytics data for formula]' \
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Treat all named arguments as casks]' \
'*::cask:__brew_casks'
}
# brew analytics
_brew_analytics() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- subcommand \
'*::subcommand:(state on off regenerate-uuid)'
}
# brew audit
_brew_audit() {
_arguments \
'--appcast[Audit the appcast]' \
'--audit-debug[Enable debugging and profiling of audit methods]' \
'--debug[Display any debugging information]' \
'(--skip-style --only-cops --except-cops)--display-cop-names[Include the RuboCop cop name for each violation in the output]' \
'--display-failures-only[Only display casks that fail the audit. This is the default for formulae]' \
'--display-filename[Prefix every line of output with the file or formula name being audited, to make output easy to grep]' \
'--eval-all[Evaluate all available formulae and casks, whether installed or not, to audit them. Implied if `HOMEBREW_EVAL_ALL` is set]' \
'(--only)--except[Specify a comma-separated method list to skip running the methods named `audit_`method]' \
'(--only-cops --strict --only-cops --only --display-cop-names)--except-cops[Specify a comma-separated cops list to skip checking for violations of the listed RuboCop cops]' \
'--fix[Fix style violations automatically using RuboCop'\''s auto-correct feature]' \
'--git[Run additional, slower style checks that navigate the Git repository]' \
'--help[Show this message]' \
'(--all)--installed[Only check formulae and casks that are currently installed]' \
'--new[Run various additional style checks to determine if a new formula or cask is eligible for Homebrew. This should be used when creating new formula and implies `--strict` and `--online`]' \
'--no-appcast[Audit the appcast]' \
'--no-signing[Audit for signed apps, which are required on ARM]' \
'--online[Run additional, slower style checks that require a network connection]' \
'(--except --only-cops --except-cops)--only[Specify a comma-separated method list to only run the methods named `audit_`method]' \
'(--except-cops --strict --except-cops --only --display-cop-names)--only-cops[Specify a comma-separated cops list to check for violations of only the listed RuboCop cops]' \
'--quiet[Make some output more quiet]' \
'--signing[Audit for signed apps, which are required on ARM]' \
'(--display-cop-names)--skip-style[Skip running non-RuboCop style checks. Useful if you plan on running `brew style` separately. Enabled by default unless a formula is specified by name]' \
'(--only-cops --except-cops)--strict[Run additional, stricter style checks]' \
'--tap[Check the formulae within the given tap, specified as user`/`repo]' \
'--token-conflicts[Audit for token conflicts]' \
'--verbose[Make some output more verbose]' \
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Treat all named arguments as casks]' \
'*::cask:__brew_casks'
}
# brew autoremove
_brew_autoremove() {
_arguments \
'--debug[Display any debugging information]' \
'--dry-run[List what would be uninstalled, but do not actually uninstall anything]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
# brew bottle
_brew_bottle() {
_arguments \
'--committer[Specify a committer name and email in `git`'\''s standard author format]' \
'--debug[Display any debugging information]' \
'--force-core-tap[Build a bottle even if formula is not in `homebrew/core` or any installed taps]' \
'--help[Show this message]' \
'--json[Write bottle information to a JSON file, which can be used as the value for `--merge`]' \
'(--no-rebuild)--keep-old[If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL]' \
'--merge[Generate an updated bottle block for a formula and optionally merge it into the formula file. Instead of a formula name, requires the path to a JSON file generated with `brew bottle --json` formula]' \
'--no-all-checks[Don'\''t try to create an `all` bottle or stop a no-change upload]' \
'--no-commit[When passed with `--write`, a new commit will not generated after writing changes to the formula file]' \
'(--keep-old)--no-rebuild[If the formula specifies a rebuild version, remove it from the generated DSL]' \
'--only-json-tab[When passed with `--json`, the tab will be written to the JSON file but not the bottle]' \
'--quiet[Make some output more quiet]' \
'--root-url[Use the specified URL as the root of the bottle'\''s URL instead of Homebrew'\''s default]' \
'--root-url-using[Use the specified download strategy class for downloading the bottle'\''s URL instead of Homebrew'\''s default]' \
'--skip-relocation[Do not check if the bottle can be marked as relocatable]' \
'--verbose[Make some output more verbose]' \
'--write[Write changes to the formula file. A new commit will be generated unless `--no-commit` is passed]' \
- installed_formula \
'*::installed_formula:__brew_installed_formulae' \
- file \
'*::file:__brew_formulae_or_ruby_files'
}
# brew bump
_brew_bump() {
_arguments \
'--debug[Display any debugging information]' \
'--full-name[Print formulae/casks with fully-qualified names]' \
'--help[Show this message]' \
'--limit[Limit number of package results returned]' \
'(--open-pr)--no-pull-requests[Do not retrieve pull requests from GitHub]' \
'(--no-pull-requests)--open-pr[Open a pull request for the new version if none have been opened yet]' \
'--quiet[Make some output more quiet]' \
'--start-with[Letter or word that the list of package results should alphabetically follow]' \
'--verbose[Make some output more verbose]' \
- formula \
'(--cask)--formula[Check only formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Check only casks]' \
'*::cask:__brew_casks'
}
# brew bump-cask-pr
_brew_bump_cask_pr() {
_arguments \
'--commit[When passed with `--write-only`, generate a new commit after writing changes to the cask file]' \
'--debug[Display any debugging information]' \
'(--write)--dry-run[Print what would be done rather than doing it]' \
'--force[Ignore duplicate open PRs]' \
'--fork-org[Use the specified GitHub organization for forking]' \
'--help[Show this message]' \
'--message[Prepend message to the default pull request message]' \
'(--online)--no-audit[Don'\''t run `brew audit` before opening the PR]' \
'--no-browse[Print the pull request URL instead of opening in a browser]' \
'--no-fork[Don'\''t try to fork the repository]' \
'--no-style[Don'\''t run `brew style --fix` before opening the PR]' \
'(--no-audit)--online[Run `brew audit --online` before opening the PR]' \
'--quiet[Make some output more quiet]' \
'--sha256[Specify the SHA-256 checksum of the new download]' \
'--url[Specify the URL for the new download]' \
'--verbose[Make some output more verbose]' \
'--version[Specify the new version for the cask]' \
'--write-only[Make the expected file modifications without taking any Git actions]' \
- cask \
'*::cask:__brew_casks'
}
# brew bump-formula-pr
_brew_bump_formula_pr() {
_arguments \
'--commit[When passed with `--write-only`, generate a new commit after writing changes to the formula file]' \
'--debug[Display any debugging information]' \
'(--write-only)--dry-run[Print what would be done rather than doing it]' \
'--force[Ignore duplicate open PRs. Remove all mirrors if `--mirror` was not specified]' \
'--fork-org[Use the specified GitHub organization for forking]' \
'--help[Show this message]' \
'--message[Prepend message to the default pull request message]' \
'--mirror[Use the specified URL as a mirror URL. If URL is a comma-separated list of URLs, multiple mirrors will be added]' \
'(--strict --online)--no-audit[Don'\''t run `brew audit` before opening the PR]' \
'--no-browse[Print the pull request URL instead of opening in a browser]' \
'--no-fork[Don'\''t try to fork the repository]' \
'(--no-audit)--online[Run `brew audit --online` before opening the PR]' \
'--python-exclude-packages[Exclude these Python packages when finding resources]' \
'--python-extra-packages[Include these additional Python packages when finding resources]' \
'--python-package-name[Use the specified package-name when finding Python resources for formula. If no package name is specified, it will be inferred from the formula'\''s stable URL]' \
'--quiet[Make some output more quiet]' \
'--revision[Specify the new commit revision corresponding to the specified git tag or specified version]' \
'--sha256[Specify the SHA-256 checksum of the new download]' \
'(--no-audit)--strict[Run `brew audit --strict` before opening the PR]' \
'(--url)--tag[Specify the new git commit tag for the formula]' \
'(--tag)--url[Specify the URL for the new download. If a URL is specified, the SHA-256 checksum of the new download should also be specified]' \
'--verbose[Make some output more verbose]' \
'--version[Use the specified version to override the value parsed from the URL or tag. Note that `--version=0` can be used to delete an existing version override from a formula if it has become redundant]' \
'(--dry-run)--write-only[Make the expected file modifications without taking any Git actions]' \
- formula \
'*::formula:__brew_formulae'
}
# brew bump-revision
_brew_bump_revision() {
_arguments \
'--debug[Display any debugging information]' \
'(--write-only)--dry-run[Print what would be done rather than doing it]' \
'--help[Show this message]' \
'--message[Append message to the default commit message]' \
'--quiet[Make some output more quiet]' \
'--remove-bottle-block[Remove the bottle block in addition to bumping the revision]' \
'--verbose[Make some output more verbose]' \
'(--dry-run)--write-only[Make the expected file modifications without taking any Git actions]' \
- formula \
'*::formula:__brew_formulae'
}
# brew bump-unversioned-casks
_brew_bump_unversioned_casks() {
_arguments \
'--debug[Display any debugging information]' \
'--dry-run[Do everything except caching state and opening pull requests]' \
'--help[Show this message]' \
'--limit[Maximum runtime in minutes]' \
'--quiet[Make some output more quiet]' \
'--state-file[File for caching state]' \
'--verbose[Make some output more verbose]' \
- cask \
'*::cask:__brew_casks' \
- tap \
'*::tap:__brew_any_tap'
}
# brew cat
_brew_cat() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Treat all named arguments as casks]' \
'*::cask:__brew_casks'
}
# brew cleanup
_brew_cleanup() {
_arguments \
'--debug[Display any debugging information]' \
'--dry-run[Show what would be removed, but do not actually remove anything]' \
'--help[Show this message]' \
'--prune[Remove all cache files older than specified days. If you want to remove everything, use `--prune=all`]' \
'--prune-prefix[Only prune the symlinks and directories from the prefix and remove no other files]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
'-s[Scrub the cache, including downloads for even the latest versions. Note that downloads for any installed formulae or casks will still not be deleted. If you want to delete those too: `rm -rf "$(brew --cache)"`]' \
- formula \
'*::formula:__brew_formulae' \
- cask \
'*::cask:__brew_casks'
}
# brew command
_brew_command() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- command \
'*::command:__brew_commands'
}
# brew commands
_brew_commands() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--include-aliases[Include aliases of internal commands]' \
'--quiet[List only the names of commands without category headers]' \
'--verbose[Make some output more verbose]'
}
# brew completions
_brew_completions() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- subcommand \
'*::subcommand:(state link unlink)'
}
# brew config
_brew_config() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
# brew contributions
_brew_contributions() {
_arguments \
'--csv[Print a CSV of contributions across repositories over the time period]' \
'--debug[Display any debugging information]' \
'--from[Date (ISO-8601 format) to start searching contributions]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--repositories[Specify a comma-separated (no spaces) list of repositories to search. Supported repositories: `brew`, `core`, `cask`, `aliases`, `autoupdate`, `bundle`, `command-not-found`, `test-bot`, `services`, `cask-drivers`, `cask-fonts`, and `cask-versions`. Omitting this flag, or specifying `--repositories=all`, searches all repositories. Use `--repositories=primary` to search only the main repositories: brew,core,cask]' \
'--to[Date (ISO-8601 format) to stop searching contributions]' \
'--user[A GitHub username or email address of a specific person to find contribution data for]' \
'--verbose[Make some output more verbose]'
}
# brew create
_brew_create() {
_arguments \
'(--cask)--HEAD[Indicate that URL points to the package'\''s repository rather than a file]' \
'(--cmake --crystal --go --meson --node --perl --python --ruby --rust --cask)--autotools[Create a basic template for an Autotools-style build]' \
'(--autotools --cmake --crystal --go --meson --node --perl --python --ruby --rust --HEAD --set-license)--cask[Create a basic template for a cask]' \
'(--autotools --crystal --go --meson --node --perl --python --ruby --rust --cask)--cmake[Create a basic template for a CMake-style build]' \
'(--autotools --cmake --go --meson --node --perl --python --ruby --rust --cask)--crystal[Create a basic template for a Crystal build]' \
'--debug[Display any debugging information]' \
'--force[Ignore errors for disallowed formula names and names that shadow aliases]' \
'(--autotools --cmake --crystal --meson --node --perl --python --ruby --rust --cask)--go[Create a basic template for a Go build]' \
'--help[Show this message]' \
'(--autotools --cmake --crystal --go --node --perl --python --ruby --rust --cask)--meson[Create a basic template for a Meson-style build]' \
'--no-fetch[Homebrew will not download URL to the cache and will thus not add its SHA-256 to the formula for you, nor will it check the GitHub API for GitHub projects (to fill out its description and homepage)]' \
'(--autotools --cmake --crystal --go --meson --perl --python --ruby --rust --cask)--node[Create a basic template for a Node build]' \
'(--autotools --cmake --crystal --go --meson --node --python --ruby --rust --cask)--perl[Create a basic template for a Perl build]' \
'(--autotools --cmake --crystal --go --meson --node --perl --ruby --rust --cask)--python[Create a basic template for a Python build]' \
'--quiet[Make some output more quiet]' \
'(--autotools --cmake --crystal --go --meson --node --perl --python --rust --cask)--ruby[Create a basic template for a Ruby build]' \
'(--autotools --cmake --crystal --go --meson --node --perl --python --ruby --cask)--rust[Create a basic template for a Rust build]' \
'(--cask)--set-license[Explicitly set the license of the new formula]' \
'--set-name[Explicitly set the name of the new formula or cask]' \
'--set-version[Explicitly set the version of the new formula or cask]' \
'--tap[Generate the new formula within the given tap, specified as user`/`repo]' \
'--verbose[Make some output more verbose]'
}
# brew deps
_brew_deps() {
_arguments \
'--annotate[Mark any build, test, optional, or recommended dependencies as such in the output]' \
'--debug[Display any debugging information]' \
'--direct[Show only the direct dependencies declared in the formula]' \
'--dot[Show text-based graph description in DOT format]' \
'(--installed)--eval-all[Evaluate all available formulae and casks, whether installed or not, to list their dependencies]' \
'--for-each[Switch into the mode used by the `--all` option, but only list dependencies for each provided formula, one formula per line. This is used for debugging the `--installed`/`--all` display mode]' \
'--full-name[List dependencies by their full name]' \
'(--tree)--graph[Show dependencies as a directed graph]' \
'--help[Show this message]' \
'--include-build[Include `:build` dependencies for formula]' \
'--include-optional[Include `:optional` dependencies for formula]' \
'--include-requirements[Include requirements in addition to dependencies for formula]' \
'--include-test[Include `:test` dependencies for formula (non-recursive)]' \
'(--eval-all --all)--installed[List dependencies for formulae that are currently installed. If formula is specified, list only its dependencies that are currently installed]' \
'--quiet[Make some output more quiet]' \
'--skip-recommended[Skip `:recommended` dependencies for formula]' \
'--topological[Sort dependencies in topological order]' \
'(--graph)--tree[Show dependencies as a tree. When given multiple formula arguments, show individual trees for each formula]' \
'--union[Show the union of dependencies for multiple formula, instead of the intersection]' \
'--verbose[Make some output more verbose]' \
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Treat all named arguments as casks]' \
'*::cask:__brew_casks'
}
# brew desc
_brew_desc() {
_arguments \
'--debug[Display any debugging information]' \
'(--search --name)--description[Search just descriptions for text. If text is flanked by slashes, it is interpreted as a regular expression]' \
'--eval-all[Evaluate all available formulae and casks, whether installed or not, to search their descriptions. Implied if `HOMEBREW_EVAL_ALL` is set]' \
'--help[Show this message]' \
'(--search --description)--name[Search just names for text. If text is flanked by slashes, it is interpreted as a regular expression]' \
'--quiet[Make some output more quiet]' \
'(--name --description)--search[Search both names and descriptions for text. If text is flanked by slashes, it is interpreted as a regular expression]' \
'--verbose[Make some output more verbose]' \
- formula \
'--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'--cask[Treat all named arguments as casks]' \
'*::cask:__brew_casks'
}
# brew developer
_brew_developer() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- subcommand \
'*::subcommand:(state on off)'
}
# brew dispatch-build-bottle
_brew_dispatch_build_bottle() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--issue[If specified, post a comment to this issue number if the job fails]' \
'(--linux-self-hosted)--linux[Dispatch bottle for Linux (using GitHub runners)]' \
'(--linux)--linux-self-hosted[Dispatch bottle for Linux (using self-hosted runner)]' \
'--linux-wheezy[Use Debian Wheezy container for building the bottle on Linux]' \
'--macos[macOS version (or comma-separated list of versions) the bottle should be built for]' \
'--quiet[Make some output more quiet]' \
'--tap[Target tap repository (default: `homebrew/core`)]' \
'--timeout[Build timeout (in minutes, default: 60)]' \
'--upload[Upload built bottles]' \
'--verbose[Make some output more verbose]' \
'--workflow[Dispatch specified workflow (default: `dispatch-build-bottle.yml`)]' \
- formula \
'*::formula:__brew_formulae'
}
# brew docs
_brew_docs() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
# brew doctor
_brew_doctor() {
_arguments \
'--audit-debug[Enable debugging and profiling of audit methods]' \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--list-checks[List all audit methods, which can be run individually if provided as arguments]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- diagnostic_check \
'*::diagnostic_check:__brew_diagnostic_checks'
}
# brew dr
_brew_dr() {
_arguments \
'--audit-debug[Enable debugging and profiling of audit methods]' \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--list-checks[List all audit methods, which can be run individually if provided as arguments]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- diagnostic_check \
'*::diagnostic_check:__brew_diagnostic_checks'
}
# brew edit
_brew_edit() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--print-path[Print the file path to be edited, without opening an editor]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Treat all named arguments as casks]' \
'*::cask:__brew_casks'
}
# brew environment
_brew_environment() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--plain[Generate plain output even when piped]' \
'--quiet[Make some output more quiet]' \
'--shell[Generate a list of environment variables for the specified shell, or `--shell=auto` to detect the current shell]' \
'--verbose[Make some output more verbose]' \
- formula \
'*::formula:__brew_formulae'
}
# brew extract
_brew_extract() {
_arguments \
'--debug[Display any debugging information]' \
'--force[Overwrite the destination formula if it already exists]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
'--version[Extract the specified version of formula instead of the most recent]' \
- formula \
'*::formula:__brew_formulae' \
- tap \
'*::tap:__brew_any_tap'
}
# brew fetch
_brew_fetch() {
_arguments \
'(--cask)--HEAD[Fetch HEAD version instead of stable version]' \
'(--build-from-source --build-bottle --force-bottle --cask)--bottle-tag[Download a bottle for given tag]' \
'(--build-from-source --force-bottle --bottle-tag --cask)--build-bottle[Download source packages (for eventual bottling) rather than a bottle]' \
'(--build-bottle --force-bottle --bottle-tag)--build-from-source[Download source packages rather than a bottle]' \
'--debug[Display any debugging information]' \
'(--cask)--deps[Also download dependencies for any listed formula]' \
'--force[Remove a previously cached version and re-fetch]' \
'(--build-from-source --build-bottle --bottle-tag --cask)--force-bottle[Download a bottle if it exists for the current or newest version of macOS, even if it would not be used during installation]' \
'--help[Show this message]' \
'--no-quarantine[Disable/enable quarantining of downloads (default: enabled)]' \
'--quarantine[Disable/enable quarantining of downloads (default: enabled)]' \
'--quiet[Make some output more quiet]' \
'--retry[Retry if downloading fails or re-download if the checksum of a previously cached version no longer matches. Tries at most 5 times with exponential backoff]' \
'--verbose[Do a verbose VCS checkout, if the URL represents a VCS. This is useful for seeing if an existing VCS cache has been updated]' \
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--HEAD --deps --s --build-bottle --force-bottle --bottle-tag --formula)--cask[Treat all named arguments as casks]' \
'*::cask:__brew_casks'
}
# brew formula
_brew_formula() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- formula \
'*::formula:__brew_formulae'
}
# brew generate-cask-api
_brew_generate_cask_api() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
# brew generate-formula-api
_brew_generate_formula_api() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
# brew generate-man-completions
_brew_generate_man_completions() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
# brew gist-logs
_brew_gist_logs() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--new-issue[Automatically create a new issue in the appropriate GitHub repository after creating the Gist]' \
'--private[The Gist will be marked private and will not appear in listings but will be accessible with its link]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
'--with-hostname[Include the hostname in the Gist]' \
- formula \
'*::formula:__brew_formulae'
}
# brew home
_brew_home() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Treat all named arguments as casks]' \
'*::cask:__brew_casks'
}
# brew homepage
_brew_homepage() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Treat all named arguments as casks]' \
'*::cask:__brew_casks'
}
# brew info
_brew_info() {
_arguments \
'--analytics[List global Homebrew analytics data or, if specified, installation and build error data for formula (provided neither `HOMEBREW_NO_ANALYTICS` nor `HOMEBREW_NO_GITHUB_API` are set)]' \
'--category[Which type of analytics data to retrieve. The value for category must be `install`, `install-on-request` or `build-error`; `cask-install` or `os-version` may be specified if formula is not. The default is `install`]' \
'--days[How many days of analytics data to retrieve. The value for days must be `30`, `90` or `365`. The default is `30`]' \
'--debug[Display any debugging information]' \
'(--installed)--eval-all[Evaluate all available formulae and casks, whether installed or not, to print their JSON. Implied if `HOMEBREW_EVAL_ALL` is set]' \
'--github[Open the GitHub source page for formula and cask in a browser. To view the history locally: `brew log -p` formula or cask]' \
'--help[Show this message]' \
'(--eval-all --all)--installed[Print JSON of formulae that are currently installed]' \
'--json[Print a JSON representation. Currently the default value for version is `v1` for formula. For formula and cask use `v2`. See the docs for examples of using the JSON output: https://docs.brew.sh/Querying-Brew]' \
'--quiet[Make some output more quiet]' \
'--variations[Include the variations hash in each formula'\''s JSON output]' \
'--verbose[Show more verbose analytics data for formula]' \
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Treat all named arguments as casks]' \
'*::cask:__brew_casks'
}
# brew instal
_brew_instal() {
_arguments \
'(--cask)--HEAD[If formula defines it, install the HEAD version, aka. main, trunk, unstable, master]' \