42 Commits

Author SHA1 Message Date
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
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
Ben Muschol
c745738c55 Make from: required, fix flaky test 2019-02-15 14:15:34 -05:00
Ben Muschol
ac005fa4ce rename source to from, change values 2019-02-15 11:01:28 -05:00
Ben Muschol
440fb185dd Fix 1 style conflict, keep the other for consistency 2019-02-15 01:16:07 -05:00
Ben Muschol
f8d84249aa Prioritize CLI arguments over env vars when they conflict 2019-02-15 00:52:30 -05:00
Gautham Goli
418a5f56dc
cli_parser: Dont raise FormulaUnavailableError 2019-02-04 22:10:47 +01:00
Mike McQuaid
1bdcd2001c
cli_parser: allow hiding from man page. 2019-01-30 21:39:29 +00:00
Mike McQuaid
9eabcdad7d
Make install/reinstall/upgrade options more consistent. 2019-01-29 19:25:59 +00:00
Gautham Goli
1748b66615
Add alias for switch method in CLI::Parser 2019-01-18 22:03:07 +05:30
Mike McQuaid
0a0e2fa0c1
cli_parser: output help failure text to stderr. 2019-01-12 19:16:44 +00:00
Gautham Goli
9c7fe3dcb9
cli_parser: Output help text on invalid option passed 2019-01-12 18:52:07 +05:30
Gautham Goli
c6c3916ddb
style: Use CLI::Parser to parse args 2018-11-07 23:45:03 +05:30
Mike McQuaid
737b84b54b
brew style --fix fixes. 2018-11-02 17:29:23 +00:00
Gautham Goli
6d3aa18f6a
cli_parser: Make Homebrew.args immutable once CLI arguments have been processed 2018-10-29 02:31:57 +05:30
Gautham Goli
f7ec07680c
cli_parser: Add support for short flag options 2018-10-25 21:43:49 +05:30
Gautham Goli
e32da937a6
cli_parser: Add custom description support for global switches 2018-10-24 17:27:31 +05:30
EricFromCanada
6b8724431f cli_parser: improve help text formatting
- reduce desc_line_length so `brew help` output fits in 80 columns
- support special formatting across line breaks
- support emphasis using asterisks
- add missing depends_on: tests
2018-10-12 13:38:14 -04:00
Gautham Goli
b5b988cbb1
help_spec: fix and generate help text in help.rb 2018-10-03 21:12:44 +05:30
Gautham Goli
7b0f27ca39
style: Fix style errors 2018-10-03 19:49:46 +05:30
Gautham Goli
446b1cb9e3
man: Seperate global options into a section 2018-10-03 19:49:45 +05:30
Gautham Goli
cfaaa0eb71
Move option descriptions to new line 2018-10-03 19:20:26 +05:30
Gautham Goli
c7bf79407a
Better man page formatting 2018-10-03 19:20:26 +05:30
Gautham Goli
83e7cbe5c5
Man page help text similar to git 2018-10-03 19:20:26 +05:30
Gautham Goli
b6c456b681
Extract out arg parsing method to <cmd>_args method 2018-10-03 19:19:04 +05:30
Gautham Goli
32e5a5686b
audit: Use OptionParser to generate help text 2018-10-03 19:18:56 +05:30
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Markus Reiter
b2c85ad945 Refactor search. 2018-06-07 13:48:35 +02:00
Gautham Goli
fba52e2f74 cli_parser: Store parsed args in Homebrew.args and access args everywhere else 2018-05-30 00:05:39 +05:30
Gautham Goli
0d53002dbc cli_parser: Add depends and conflicts for switch options 2018-05-25 04:05:45 +05:30
Mike McQuaid
b1a92ba14a
Merge pull request #3987 from GauthamGoli/bump-formula-pr-args
bump-formula-pr: Use Parser to parse args
2018-05-01 07:50:29 +01:00
Gautham Goli
07ee23d711 cli_parser: Refactor interface for depends, conflicts and add tests 2018-04-30 15:47:13 +05:30
Mike McQuaid
0a00312b71 Autocorrect new RuboCop 0.55.0 style violations. 2018-04-17 10:54:58 +01:00
Gautham Goli
36c1ad9f64 cli_parser: Add depends, conflicts option constraints 2018-04-14 21:44:47 +05:30
Gautham Goli
48aecf2fa7 cli_parser: Refactor required argument for flag to '=' 2018-04-14 19:04:24 +05:30
Gautham Goli
d22b750e17 Store common switch as Homebrew.args global var 2018-04-10 00:00:35 +05:30
Mike McQuaid
daf118971c cli_parser: undefine OpenStruct instance tap.
Undefine `tap` to allow `--tap` arguments to work as expected.
2018-04-08 16:40:02 -07:00
Gautham Goli
8ef1fb30a0 Add :quiet, :verbose, :debug common switches to be specified 2018-03-29 03:20:14 +05:30
Gautham Goli
ed387572ec cli_parser: Add class method to make options declaration more readable 2018-03-25 18:02:29 +05:30
Gautham Goli
99438e8e44 Parser: Add env named argument for switch to check environment variables 2018-03-25 11:04:18 +05:30
Gautham Goli
5743f22209 cli : Implement Parser and use it for parsing audit command args 2018-03-09 02:44:50 +05:30