105 Commits

Author SHA1 Message Date
Mike McQuaid
6f071a06f8
Use JSON.pretty_generate
It's dramatically more human readable for very little difference in
space.
2021-04-09 15:44:37 +01:00
Bo Anderson
8e98ce69f3
Stricter handling of CLI args 2021-03-18 16:41:57 +00:00
Mike McQuaid
d6957a3acb
Homebrew 3.0.0 deprecations/disables 2021-01-29 19:50:24 +00:00
EricFromCanada
2ed324ebc0 use backticks around suggested input, flags, and binaries 2021-01-26 16:19:47 -05:00
Rylan Polster
d1f3e39b7b
Update commands to generate usage banner 2021-01-18 21:20:11 -05:00
Dawid Dziurla
332372469f
cmd: indicate multiple named args in usage banner 2021-01-15 13:04:00 +01:00
Rylan Polster
da811373d3 Add named_args DSL for commands 2021-01-13 17:09:42 -05:00
Mike McQuaid
74fb058c7e
More deprecations
More deprecations, disabling and removal for Homebrew 2.7.0.
2020-12-18 14:17:37 +00: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
EricFromCanada
f784b7107f manpage: fixes for grammar 2020-11-16 07:56:50 -05:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Mike McQuaid
0606c9fd82
outdated/upgrade: fix upgrade alias edge case.
If you're going to follow an alias to find the outdated formula then
ensure that the latest one isn't already installed.

Fixes https://github.com/Homebrew/homebrew-core/issues/63971
2020-11-05 20:33:51 +00:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Markus Reiter
90f145114c Pass Cask::Config to Caskroom.casks. 2020-10-01 01:03:13 +02:00
Markus Reiter
5f005f67cf Refactor global Cask::Config. 2020-10-01 00:57:10 +02:00
Mike McQuaid
2e5272d04c Deprecate/disable code for Homebrew 2.5.0.
Do the usual "disable deprecations" and "uncomment pending deprecations"
dance and delete/deprecate/disable relevant/related code.
2020-09-03 10:34:22 +01:00
William Ma
fa7bd3bff6 args: Migrate usage of args loading methods to args.named 2020-08-23 09:02:20 -04:00
Collin Styles
d45701cf9b Switch greedy argument to a keyword
The `greedy` parameter was switched to a keyword parameter in
3a91c37e66661781a236422c4ab8fc597e09a7a1 but this call wasn't updated
accordingly.
2020-08-19 10:05:56 -07:00
Mike McQuaid
3875f16782
Fix --formula and --cask flags.
These were all made `--formulae` and `--casks` for consistency but that
doesn't behave as expected because they have special behaviours in
`args`. Instead, use the singular form everywhere.
2020-08-07 09:53:30 +01:00
Markus Reiter
490e503b1b Replace Homebrew.args with Context. 2020-08-06 16:13:14 +02:00
Mike McQuaid
ced084bd49
Handle casks in commands more consistently.
- Ensure the usage documentation always mentions casks when appropriate
- Use --formulae or --casks consistently
- Provide --formulae and --casks switches to upgrade
- Mark more switches as conflicting
2020-08-06 09:25:45 +01:00
Bo Anderson
97e05ae410 cmd/outdated: restore sorting of formulae 2020-08-02 00:51:42 +01:00
Rylan Polster
49678e585e outdated: fix args 2020-08-01 13:20:35 -04:00
Markus Reiter
1d0ac5c6b3 Pass args correctly in brew outdated. 2020-07-31 19:34:22 +02:00
Markus Reiter
d4c2ffd705 Refactor CLI::Parser. 2020-07-31 15:07:17 +02:00
William Ma
fa60d99265 outdated: vary deprecated message depending on flag 2020-07-27 09:34:52 -04:00
William Ma
f8708ae80c Add todo for --json=v1 deprecation 2020-07-27 09:12:30 -04:00
William Ma
8d4a443e4d outdated: Fix most code review comments 2020-07-22 22:52:18 -04:00
William Ma
b4f8e23ee1 outdated: Fix documentation style
Co-authored-by: Eric Knibbe <enk3@outlook.com>
2020-07-20 14:35:27 -04:00
William Ma
03857319c9 outdated: Update documentation about json versions 2020-07-17 10:28:09 -04:00
William Ma
8c5140f6e6 outdated: Implement json v2 2020-07-17 08:53:19 -04:00
William Ma
299db98dbf Fix PR issues 2020-07-16 23:31:26 +10:00
William Ma
d81296f8dc outdated: Rename --formula-only and --cask-only to --formula and --cask
For consistency with brew --cache
2020-07-16 23:31:26 +10:00
William Ma
ee0e9945e0 outdated: Update logic when handling --json to be more explicit 2020-07-16 23:31:26 +10:00
William Ma
966131f768 outdated: Fail when user supplies formulae and some are outdated 2020-07-16 23:31:26 +10:00
William Ma
a3da9fa350 outdated: Actually print json information for casks 2020-07-16 23:31:26 +10:00
William Ma
bdc99ebd98 outdated: Allow references to cask 2020-07-16 23:31:26 +10:00
Mike McQuaid
a7fe0ed847
cmd: use more and cleanup new args APIs. 2020-03-05 09:40:15 +00:00
Gautham Goli
959b88266d
ARGV: Replace usages of ARGV.resolved_formulae with Homebrew.args 2020-01-02 13:56:19 +00:00
EricFromCanada
2f7c3afeb8 cmd: improve wording of messages, spacing 2019-12-15 00:04:45 -05:00
EricFromCanada
c246207ba0 cmd: updates for command descriptions 2019-12-13 15:24:00 -05:00
EricFromCanada
8a8359cdd4 manpages: sentence rewording for readability
Use active voice when applicable, better verbs & adjectives, preposition usage, proper tense, etc.
2019-08-20 09:05:45 -04:00
EricFromCanada
b4303cd983 manpages: fix command & option descriptions 2019-08-20 09:03:33 -04:00
EricFromCanada
a3e0647797 manpages: whitespace fixes 2019-08-20 08:24:20 -04:00
Mike McQuaid
c4f72312ce
Fixup brew style failures. 2019-04-30 09:19:18 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
e40b171127
Rename cli_parser to cli/parser. 2019-04-17 22:16:50 +09:00
EricFromCanada
aead4a720d outdated & tap-info: set default value for --json
Matching what's already been done for `brew info`.
2019-03-04 11:59:49 -05:00
Mike McQuaid
6cb7a00f2d
cmd: remove --help headers and tweak docs. 2019-01-30 21:39:28 +00:00
Mike McQuaid
867b155479
Add missing conflicts to command options. 2019-01-29 19:39:41 +00:00