Commit Graph
182 Commits
Author SHA1 Message Date
Mike McQuaidandGitHub 00fab0294b Merge pull request #10403 from Rylan12/zsh-completions
Generate zsh completions automatically
2021-01-26 10:19:59 +00:00
Seeker 7863879145 named_args: raise error if formula/cask is found but unreadable 2021-01-25 11:49:27 -08:00
Rylan Polster 3e8b91679d completions: generate zsh completions 2021-01-25 13:46:51 -05:00
Mike McQuaidandGitHub d0e1c3dc5f Merge pull request #10400 from issyl0/improve-brew-extract-args
dev-cmd/extract: Improve the usage instructions
2021-01-25 09:55:01 +00:00
Rylan Polster 01e894e9c6 parser: create NumberOfNamedArgumentsError
And commit `brew man` changes
2021-01-23 15:26:21 -05:00
Rylan Polster b7b624c9bf parser: clarify errors for invalid number of args 2021-01-23 15:06:44 -05:00
Rylan Polster be02591cb6 Add brew release command 2021-01-21 18:29:43 -05:00
Rylan Polster 64816651d0 Only tap homebrew/cask on CaskUnavailableError in brew install 2021-01-20 12:22:31 -05:00
SeekerandGitHub 50cd836427 Merge pull request #10351 from SeekingMeaning/sig-braces
rubocop: require braces for Sorbet `sig`
2021-01-19 03:50:20 -08:00
Rylan Polster 1e4fef8123 usage string generator: fix handling of dashed-commands 2021-01-18 21:20:12 -05:00
Rylan Polster a9a0c415e7 Cleanup usage strings for flags 2021-01-18 21:20:11 -05:00
Rylan Polster 6f69aab6cf Cleanup usage string
Include only global args and list the specific options if there are two or fewer.
2021-01-18 21:20:11 -05:00
Rylan Polster b7977244ea parser: automatically generate usage banners 2021-01-18 21:16:24 -05:00
Seeker fbafaff4fe rubocop: require braces for Sorbet sig 2021-01-18 16:52:45 -08:00
Rylan PolsterandSeeker eebc161ea5 Incorporate suggestions from code review
Co-Authored-By: Seeker <meaningseeking@protonmail.com>
2021-01-15 00:13:30 -05:00
Rylan Polster 3af16832d9 Generate bash completions automatically 2021-01-15 00:03:28 -05:00
Rylan Polster 74c1010256 parser: add tests for named methods 2021-01-14 15:14:10 -05:00
Rylan Polster da811373d3 Add named_args DSL for commands 2021-01-13 17:09:42 -05:00
Markus Reiter 9922ad382f Ignore invalid keys when reading existing Cask::Config. 2021-01-13 08:30:50 +01:00
souleater7 e50e3e4b22 Delete references to devel 2021-01-01 10:16:31 -08:00
Rylan PolsterandGitHub c54acefab3 Merge pull request #10147 from Rylan12/rename-cask-args
cli/parser: use - instead of _ in cask args
2020-12-28 22:07:39 -05:00
Mike McQuaidandGitHub dc52ff620b Merge pull request #10031 from hyuraku/only_path_formula_or_cask
add function to define path
2020-12-28 13:22:22 +00:00
Rylan PolsterandMike McQuaid 224c7f44e2 cli/args: --HEAD implies building from source 2020-12-28 08:48:38 +00:00
Rylan Polster ab97c30b14 cli/parser: use - instead of _ in cask args 2020-12-25 12:42:18 -05:00
Issy LongandRylan Polster 531cae4b8c cli/parser: Option-ify arg names when raising OptionConstraintError
- There's already a method on `CLI::Parser`, we don't need to hand-roll
  the "number of dashes" detection.

Co-authored-by: Rylan Polster <rslpolster@gmail.com>
2020-12-24 16:52:39 +00:00
Issy Long 27afcf5779 cli/parser: Improve single or multi "-" detection
- This reads nicer (to me).
2020-12-24 15:54:24 +00:00
Issy Long 570a660758 cli/parser: Only prefix short options with one dash
- This avoids error messages like:

```
➜ brew list -l
Error: Invalid usage: `--l` cannot be passed without `--formula`.
```
2020-12-24 13:33:37 +00:00
Seeker 8fc478fef1 cli: fix underlined multi-line help text 2020-12-18 20:54:34 -08:00
Mike McQuaid 74fb058c7e More deprecations
More deprecations, disabling and removal for Homebrew 2.7.0.
2020-12-18 14:17:37 +00:00
hyuraku 0a97cd18a5 set default args 2020-12-17 21:14:18 +09:00
hyuraku 7be216fcbe change function name 2020-12-17 21:07:43 +09:00
hyuraku d7f9bb6247 add function to define path 2020-12-17 21:07:43 +09:00
Markus Reiter f711352cfd Add audit for livecheck in casks. 2020-12-14 15:44:35 +01:00
EricFromCanada 9dec442e71 pr-pull: prepare replacement for --workflow flag 2020-12-11 16:50:03 -05:00
Markus Reiter 1c2a31e224 Allow passing individual casks to bump-unversioned-casks for debugging. 2020-12-08 01:03:39 +01:00
Bryce Glover c237223e15 [Library/Homebrew/cli/named_args.rb] to_formulae_to_casks(): Reassociate its
`rescue` block with the right enclosing scope.

     PR #9398 accidentally removed some semantically significant indentation in
this function, thus inadvertently kicking the `rescue` block inside out to func-
tion scope, when it moved its code further up in the file.  This may well not
confuse a Ruby interpreter, but it could trip human readers up.  Compensate and
correct the overlooked offending oversight and potential refactoring mistake by
restoring only that indentation, leaving the function in its new location.

Refs #9398.
2020-12-05 16:34:55 -05:00
Markus Reiter 9649ef975c Only install default cask tap automatically on macOS. 2020-12-05 03:39:01 +01:00
Markus Reiter e0aa934219 Ensure default cask tap is installed on CaskUnavailableError. 2020-12-05 03:25:58 +01:00
Rylan PolsterandGitHub 77b4275f81 Merge pull request #9326 from Rylan12/migrate-style-exceptions
Migrate style exceptions to homebrew/core
2020-12-01 12:19:45 -05:00
EricFromCanadaandMike McQuaid b7aae0c643 parser: allow a disabled switch to specify its replacement 2020-12-01 12:02:44 +00:00
Rylan Polster 8d5dc76284 Satisfy brew typecheck 2020-11-30 20:32:46 -05:00
Markus Reiter 47b8f96efb Require formula for named arguments. 2020-11-30 04:18:23 +01:00
Markus Reiter fddd589bc3 Make more requires in NamedArgs lazy. 2020-11-30 00:57:36 +01:00
Markus Reiter 7348185347 Reorder global. 2020-11-30 00:00:02 +01:00
Markus Reiter 4560c06b7e Add more method signatures for CLI::Args. 2020-11-29 22:37:24 +01:00
Markus Reiter 650ec514c1 Fix type errors in test. 2020-11-29 21:23:54 +01:00
Markus Reiter 1b9002c04a Fix type errors in postinstall. 2020-11-29 21:23:54 +01:00
Mike McQuaid d496f5c121 Deprecations for Homebrew 2.6.0
Do the usual deprecate/disable dance for the Homebrew 2.6.0 release.

Not to be merged until the next release will definitely be 2.6.0.
2020-11-24 16:44:02 +00:00
Markus Reiter 9140b21d80 Support --cask flag in brew info. 2020-11-20 10:36:15 +01:00
Markus ReiterandGitHub 7dd7d69cd8 Merge pull request #9207 from reitermarkus/brew-zap
Add `--zap` flag for `brew uninstall`.
2020-11-20 09:42:13 +01:00