91 Commits

Author SHA1 Message Date
Markus Reiter
b48bc316e0 Use CLI::Parser for cask commands. 2020-08-13 05:15:15 +02:00
Markus Reiter
48444d50af Refactor brew man. 2020-07-31 19:40:49 +02:00
Markus Reiter
d4c2ffd705 Refactor CLI::Parser. 2020-07-31 15:07:17 +02:00
Markus Reiter
e9ade913c4 Pass args in man instead of using global args. 2020-07-30 03:21:12 +02:00
Jonathan Chang
76709d82c5 Fix brew style. 2020-07-13 23:24:14 +10:00
Caleb Xu
a53c92bd7f Cache commands list for faster shell completions 2020-06-18 11:06:31 -04:00
Mike McQuaid
ad75e40ce7
man: generate from Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Mike McQuaid
2afeffc91b
man: include full help from external commands.
Inspired by https://github.com/Homebrew/brew/issues/7148
2020-03-11 12:22:46 +00:00
Mike McQuaid
f63d2d7887
man: be more exact about global options.
Make clear these don't necessarily apply to all subcommands
(see https://github.com/Homebrew/brew/issues/7121).
2020-03-11 12:16:47 +00:00
Mike McQuaid
8a9dcad2c7
Move more command handling logic to commands.rb. 2020-02-02 17:05:45 +01:00
Mike McQuaid
eb87651341
Revert "Revert "help: print cli/parser help message if used"" 2020-02-02 16:36:59 +01:00
Mike McQuaid
2082379a61
Revert "help: print cli/parser help message if used" 2020-02-02 09:11:23 +01:00
Mike McQuaid
b03efb4356
Move shared man/help logic to cli/parser. 2020-02-01 19:05:03 +01:00
Mike McQuaid
76711e3222
Fix Rubocop 0.78.0 failures. 2019-12-19 12:01:51 +00:00
EricFromCanada
aea6d79d21 option parser: check for extra named args 2019-12-15 00:04:45 -05:00
Jonathan Chang
81db0e9551 dev-cmd: enable frozen string literals
Now that we use Ruby 2.6 we can fix these last two files.
2019-11-04 21:00:20 +11:00
Issy Long
1f6168fe8a
Change regexp.match?(string) to string.match?(regexp) everywhere
- Only try to call `.match?` on strings that aren't nil.
2019-10-13 23:22:51 +01:00
Issy Long
69d84ebfd9
Auto-fix Lint/ErbNewArguments offenses 2019-10-13 16:04:29 +01:00
Issy Long
b78028b9c2
Auto-fix Performance/RegexpMatch offenses 2019-10-13 16:04:26 +01:00
Mike McQuaid
7ed95ab48e
man: die if blank output received. 2019-10-08 16:37:45 +01:00
EricFromCanada
2477773259 man: include global options with customized descriptions 2019-08-25 23:59:47 -04:00
EricFromCanada
3ed9b35f70 man: allow multi-line paragraphs for comment-based docs 2019-08-20 12:56:21 -04: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
Mike McQuaid
c4f72312ce
Fixup brew style failures. 2019-04-30 09:19:18 +01:00
Mike McQuaid
fc6bd2ea1c
Fixup more frozen string handling. 2019-04-20 14:07:29 +09:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
d1ea6f38d3
Fix mutable constants violations. 2019-04-19 21:46:20 +09:00
Mike McQuaid
e40b171127
Rename cli_parser to cli/parser. 2019-04-17 22:16:50 +09:00
Mike Miller
56ac7ed58b man: omit global options from shell command usage
When reading the comment header of a shell command, omit options that
are in Homebrew::CLI::Parser.global_options, since they are documented
separately for all commands.
2019-03-16 23:11:04 -07:00
Mike Miller
a4c8fc74f7 man: parse short and long options in shell commands
Add a regex to handle two comma-separated options on the same line in
command help strings.
2019-03-16 23:09:11 -07:00
Mike McQuaid
710859e300
Update Linuxbrew references to Homebrew on Linux
This is a clearer branding for us to use.

Also, as part of testing this, make some fixes to Jekyll in the docs folder.

Fixes #5835
2019-03-12 20:13:38 +00:00
Mike McQuaid
ba28853237
Merge pull request #5739 from MikeMcQuaid/governance
Add/link Homebrew Governance document.
2019-02-22 16:50:33 +00:00
Mike McQuaid
e095da4d01
rubocop: enable Layout/EmptyLineAfterGuardClause. 2019-02-21 12:55:49 +00:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Mike McQuaid
aafcbc1153
Add/link Homebrew Governance document. 2019-02-15 10:54:30 +00:00
Mike McQuaid
947b90961b
Note leadership changes
Today the Homebrew maintainers elected a new PLC, TSC and project lead.
Documentation is to follow detailing exactly the responsibilities for
each of these roles but adjust these to reflect the current state until
that point.
2019-02-04 17:09:31 +01:00
Mike McQuaid
bbea109926
dev-cmd: remove --help headers and tweak docs. 2019-01-30 21:39:28 +00:00
Mike McQuaid
0fff6e0c09
man: improve manpage output. 2019-01-30 21:38:44 +00:00
Mike McQuaid
efc3c0c4c0
Use bundle install in more places.
This provides a more consistent version for `rubocop` than relying on
`Homebrew.install_gem_setup_path!` (and we really want `brew style` to
provide consistent output).
2019-01-08 15:08:21 +00:00
Gautham Goli
f7013d1738
man: Restore args after generating man pages from respective cmd parsers 2018-10-24 01:33:55 +05:30
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
7fb425a5c6 man.rb: avoid showing comma when an option has no long version.
Specifically, `brew ruby -e "<ruby code>"`.
2018-10-19 13:12:55 -04:00
EricFromCanada
63b3d400e0 dev-cmd/: add Parser-based help text for remaining commands.
`brew ruby` now accepts only `-e`, verbose, and debug arguments.
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
Mike McQuaid
448096168b
Update manpages
- dev-cmd/man: sort the `cmd_path`s (for APFS)
- update manpages based on latest content
2018-10-10 14:41:50 +01:00
EricFromCanada
b2b8f632bb docs: distinguish <code> and <var> in HTML output
Replace <var> tags with markup for italicized monospaced text in Markdown.
This requires the source to not combine bracketed and backticked text.
2018-10-06 00:51:13 -04:00
EricFromCanada
dbea3cbe90 restore sorting of options after commands 2018-10-06 00:47:58 -04:00
EricFromCanada
997a207889 docs: fix Official External Commands section
Work around ronn's inability to nest indents within list items by modifying its output to add a line break and indent after lines ending with a colon that aren't a list item's first line. This allows `brew.1.md.erb` to join the commands' help text without extra line breaks, which avoids the issue where kramdown was turning any command specs containing pipe characters into tables in the HTML output.
2018-10-05 23:47:48 -04:00
Gautham Goli
38feaf1270
extract: Add option descriptions 2018-10-03 20:18:05 +05:30
Gautham Goli
a03d2e0cd1
man: Correct option synopsis 2018-10-03 19:49:46 +05:30