98 Commits

Author SHA1 Message Date
Eric Knibbe
4662678b3b
cmd+dev-cmd: adjust description line breaks
Use to distinguish additional notes from initial explanation and usage info
2023-09-11 02:29:21 -04:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Douglas Eichelberger
1943132cf6 Move i18n out of global 2023-03-11 17:27:53 -08:00
Mike McQuaid
2d5eab2e1c
brew style --fix 2022-06-30 08:56:21 +01:00
Alex Balgavy
b886b2d1f7
Remove mentions of nonexistent command brew diy
The output of `brew doctor` can mention a command `brew diy`, which no
longer exists.
2022-05-06 10:22:25 -04:00
Carlo Cabrera
238387d694
Use HOMEBREW_DEFAULT_PREFIX instead of /usr/local
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-10-15 00:17:55 +08:00
Carlo Cabrera
19953c01b3
cmd/link: change default_prefix? check to /usr/local check
Linking macOS-provided software breaks things only in `/usr/local`
prefixes, hence the `default_prefix?` check, which was included when our
only default prefix on macOS was `/usr/local`. Now that we install into
`/opt/homebrew` too, the default prefix check is needlessly restrictive.
2021-10-14 22:13:55 +08:00
Connor Mann
074b2d65e4 Clean up and fix typecheck issue 2021-05-24 21:06:09 -04:00
Connor Mann
ef4c401687 Change kegs map to array 2021-05-24 12:29:32 -04:00
Connor Mann
074facebd5 Start catching all nil kegs 2021-05-21 10:27:31 -04:00
Connor Mann
e977f3514d Warn if no HEAD keg installed w/ --HEAD 2021-05-21 09:33:29 -04:00
Connor Mann
b72f5ef353 Change brew link to use to_latest_kegs 2021-05-20 12:58:44 -04:00
Connor Mann
fe9a9bb24c Rename to_keg to to_default_kegs 2021-05-19 09:34:18 -04:00
Connor Mann
f23d4d4c75 Switch to using to_keg and to_kegs 2021-05-18 11:00:17 -04:00
Connor Mann
f92300f129
Update Library/Homebrew/cmd/link.rb
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-05-18 09:35:05 -04:00
Connor Mann
212b64836f Update usage message 2021-05-17 12:42:06 -04:00
Connor Mann
8de9baa0f5 Add brew link --HEAD 2021-05-17 11:28:15 -04:00
EricFromCanada
6fc116318e fixes for grammar and wording 2021-01-26 16:19:47 -05: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
Markus Reiter
5be4c9b5e0 Upgrade typed sigils. 2020-11-25 17:04:19 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Mike McQuaid
1f971ba2a0
link: link kegs without formulae.
Needed for `brew diy`.

Fixes #9036
2020-11-04 08:57:30 +00:00
Mike McQuaid
dcba99c7d1
Revert "Revert "Improve @-versioned formulae linking."" 2020-11-02 11:20:09 +00:00
Shaun Jackman
099af8cf9c
Revert "Improve @-versioned formulae linking." 2020-10-30 10:40:10 -07:00
Mike McQuaid
849034c368
Improve @-versioned formulae linking.
The way we currently handle @-versioned formulae linking is pretty
labourius:
- it requires extensive use of `link_overwrite` to avoid the `link`
  stage failing on certain install/upgrade scenarios
- we teach people to use `brew link --force` whenever they wish to
  link a versioned formulae when it's pretty obvious what's expected
  in that situation

Instead, let's:
- automatically unlink other versioned formulae when linking a
  versioned formula (either through `brew link` or `install`/`upgrade`
  /`reinstall`)
- notify the user what we've done (with the same messaging as if
  they had run `brew link` manually)
2020-10-29 13:35:03 +00:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
William Ma
fa7bd3bff6 args: Migrate usage of args loading methods to args.named 2020-08-23 09:02:20 -04:00
Markus Reiter
6c964d4a78 Pass verbose? to Keg#link, Keg#unlink and Keg#optlink. 2020-08-06 16:12:52 +02:00
Markus Reiter
d4c2ffd705 Refactor CLI::Parser. 2020-07-31 15:07:17 +02:00
Markus Reiter
c0d42dd922 Remove --force from global_options. 2020-07-28 10:31:11 +02:00
Alessandro Di Felice
b752efbd37
Fix KeyOnlyReason property access. 2020-04-12 10:08:35 -05:00
Mike McQuaid
7f32e23a65
cmd/link: don't link shadowed macOS software. 2020-04-12 13:12:03 +01:00
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Mike McQuaid
a7fe0ed847
cmd: use more and cleanup new args APIs. 2020-03-05 09:40:15 +00:00
EricFromCanada
2f7c3afeb8 cmd: improve wording of messages, spacing 2019-12-15 00:04:45 -05:00
Zach Auten
fd429d0d75 Moved kegs from ARGV to args.rb 2019-11-09 11:56:47 -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
ee314617f7 manpages: update command usage strings 2019-08-20 08:55:54 -04:00
Jonathan Chang
fe36f3db67 cmd/link: fix typo 2019-08-05 15:10:00 +10: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
6cb7a00f2d
cmd: remove --help headers and tweak docs. 2019-01-30 21:39:28 +00:00
Mike McQuaid
2a346241c2
link: prevent :provided_by_macos links everywhere.
We've not seen complaints about these and they are the default behaviour
on High Sierra and Mojave so it's easier to apply them consistently
everywhere.
2018-12-06 13:59:28 +00:00
Gautham Goli
bf47a9a851
link: Use CLI::Parser to parse args 2018-11-05 12:20:10 +05:30
Shaun Jackman
f6093961ef Add Homebrew::DEFAULT_PREFIX for Linux
The default prefix is /usr/local on macOS
and /home/linuxbrew/.linuxbrew on Linux.
2018-09-11 09:57:08 -07:00
Mike McQuaid
19d87bf15f link: when refusing link display keg only caveats
These are a bit easier to follow and have been recently improved.

Inspired by conversation in #4441.
2018-07-26 10:49:55 +01:00