58 Commits

Author SHA1 Message Date
Eric Knibbe
3dc9e88542
parser: show related env var in switch description 2025-06-03 13:57:42 -04:00
Sam Ford
01cb74e525
livecheck: clarify livecheckable language
Formulae, casks, and resources have a `#livecheckable?` method that
indicates whether they contain a `livecheck` block. This is intended
to be read as "has a livecheckable?", not "is livecheckable?" (as
livecheck can find versions for some packages/resources without a
`livecheck` block). Unfortunately, correct understanding of this
method's behavior [outside of documentation] relies on historical
knowledge that few people possess, so this is often confusing to
anyone who hasn't been working on livecheck since 2020.

In the olden days, a "livecheckable" was a Ruby file containing a
`livecheck` block (originally a hash) with a filename that
corresponded to a related formula. The `livecheck` blocks in
livecheckable files were integrated into their respective formulae in
August 2020, so [first-party] livecheckables ceased to exist at that
time. From that point forward, we simply referred to these as
`livecheck` blocks.

With that in mind, this clarifies the situation by replacing
"livecheckable" language. This includes renaming `#livecheckable?` to
`#livecheck_defined?`, replacing usage of "livecheckable" as a noun
with "`livecheck` block", replacing "livecheckable" as a boolean with
"livecheck_defined", and replacing incorrect usage of "livecheckable"
as an adjective with "checkable".
2024-12-02 10:13:03 -05:00
Issy Long
4b83521061
dev_cmd/irb: Straight away require "formula"
- Otherwise we get: `uninitialized constant String::Formula (NameError)```
2024-07-03 20:39:36 +01:00
Issy Long
1b517a9d49
dev-cmd/irb: Bump to Sorbet typed: strict 2024-06-30 19:07:38 +01:00
Douglas Eichelberger
11720132bb cleanup 2024-04-21 14:34:55 -07:00
Douglas Eichelberger
cb71938fff Enable strict typing in CLI::Parser 2024-04-21 14:16:25 -07:00
Douglas Eichelberger
351f14f9f4 Add IRB H = Homebrew alias 2024-04-04 19:15:59 -07:00
Douglas Eichelberger
c50fb2dbd2 Remove redundant cli/parser requires 2024-03-29 18:53:07 -07:00
Douglas Eichelberger
afaa48bd17 Port Homebrew::DevCmd::Irb 2024-03-21 19:04:31 -07:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Bo Anderson
3b1c171184
Further split up Gemfile into groups 2023-09-27 17:33:44 +01:00
Markus Reiter
486c3765ce
Add --os=all and --arch=all options. 2023-05-17 15:26:46 +02:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Mike McQuaid
d69c3ef3df
Vendor more gems
Let's resolve the intermittent issues we've seen when various installed
on demand gems cannot be installed by including them all in the
Gemfile.
2023-03-28 09:12:48 +01:00
Douglas Eichelberger
0b04b99e68 brew typecheck --suggest-typed --update 2023-03-09 20:32:46 -08:00
Mike McQuaid
e5c0fb4ca6
Merge pull request #14892 from apainintheneck/irb-improvements
`brew irb` improvements
2023-03-08 12:46:56 +00:00
apainintheneck
deabd4a5f9 Change history and config file dirs
Now both REPL history is written to $HOME.
- Pry: $HOME/.brew_pry_history
- IRB: $HOME/.brew_irb_history

The IRB config file has also been moved to the
library directory.
2023-03-07 19:15:05 -08:00
apainintheneck
9f7ab25af5 irb: improve pry config
The idea here is that the pry session history
should be separate for homebrew than the global
pry history.

We also ignore any .pryrc files so that they
don't interfere with this config.
2023-03-06 22:37:09 -08:00
apainintheneck
6ab6d7c8ee irb: save repl history
This enables history for `brew irb` sessions.
It saves that history to the repository directory.
2023-03-06 22:24:14 -08:00
apainintheneck
11a0ea1833 irb: enable global options
The --debug and --quiet options weren't working before
with the REPL because IRB didn't recognize them.
2023-03-05 10:22:34 -08:00
apainintheneck
73f0fc3f1a brew/irb: add cask monkey patch
This makes it easier to load casks in repl sessions
and matches what we already do with formulae.
2023-03-04 12:25:08 -08:00
EricFromCanada
2ed324ebc0 use backticks around suggested input, flags, and binaries 2021-01-26 16:19:47 -05:00
EricFromCanada
cd3cb6928b indent suggested commands on subsequent line
and combine sequential puts calls
2021-01-26 15:36:44 -05:00
EricFromCanada
571179ff0e pass second argument to ohai when applicable 2021-01-26 15:36:43 -05:00
Rylan Polster
d1f3e39b7b
Update commands to generate usage banner 2021-01-18 21:20:11 -05:00
Markus Reiter
6f09768549 Add missing require in dev-cmd/irb. 2020-12-01 12:05:21 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Markus Reiter
8a32954940 Move cask/all to just cask. 2020-08-09 01:34:07 +02:00
Bo Anderson
eea4492305 dev-cmd/irb: move comment 2020-08-03 02:27:20 +01:00
Markus Reiter
5efed5d8c5 Remove debug message. 2020-07-31 19:36:27 +02:00
Markus Reiter
be2d19fe07 Refactor handling of formula options in CLI::Parser. 2020-07-31 17:46:54 +02:00
Markus Reiter
d4c2ffd705 Refactor CLI::Parser. 2020-07-31 15:07:17 +02:00
Mike McQuaid
ef95b59ed4
Remove HomebrewArgvExtension
Fixes #5730
2020-05-23 19:39:11 +01:00
Mike McQuaid
4f75a77b08
Update deprecations
Add more deprecations, disable deprecations and remove disabled code.
2020-05-18 13:50:46 +01:00
Mike McQuaid
20a1199375
Refactor CLI to remove unless args_parsed
Refactor the CLI::Args module so it doesn't have different paths to
check arguments depending on whether the arguments have been parsed or
not. Instead, set the values we need from the global ARGV at
first, global initialisation time where they will be thrown away when
the actual arguments are parsed.

To do this some other general refactoring was needed:
- more methods made private when possible
- e.g. `HEAD?` used consistently instead of `head` before arguments
  are parsed.
- formula options are only parsed after named arguments are extracted
2020-05-05 17:47:51 +01: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
Mike McQuaid
cee75b6af2
ARGV: freeze when using CLI::Parser.
Otherwise `Homebrew.args` values may not match those of modified `ARGV`.
2019-02-18 16:56:43 +00:00
Mike McQuaid
bbea109926
dev-cmd: remove --help headers and tweak docs. 2019-01-30 21:39:28 +00:00
Mike McQuaid
737b84b54b
brew style --fix fixes. 2018-11-02 17:29:23 +00:00
EricFromCanada
388781f6a7 dev-cmd/: remove colons from command specs.
These aren't needed when converting Parser-based help text to man page or Markdown formats.
Includes regenerated docs.
2018-10-19 13:12:55 -04:00
EricFromCanada
ddf057f3dd dev-cmd/: edit help text and descriptions. 2018-10-19 13:12:11 -04:00
Gautham Goli
a03d2e0cd1
man: Correct option synopsis 2018-10-03 19:49:46 +05:30
Gautham Goli
7b0f27ca39
style: Fix style errors 2018-10-03 19:49:46 +05:30
Gautham Goli
f60582ca48
man: Remove [] from command synopsis 2018-10-03 19:49:45 +05:30
Gautham Goli
446b1cb9e3
man: Seperate global options into a section 2018-10-03 19:49:45 +05:30
Gautham Goli
e0e876cf37
man: Make command heading H3 2018-10-03 19:49:44 +05:30
Gautham Goli
4f58f2db99
man: Generate dev cmd manpages 2018-10-03 19:49:41 +05:30