47 Commits

Author SHA1 Message Date
William Ma
fa7bd3bff6 args: Migrate usage of args loading methods to args.named 2020-08-23 09:02:20 -04:00
Markus Reiter
5540eac625 Refactor and document Options. 2020-08-19 10:40:33 +02:00
Markus Reiter
005e9dd5b3 Pass args correctly in brew options. 2020-07-31 19:24:13 +02:00
Markus Reiter
d4c2ffd705 Refactor CLI::Parser. 2020-07-31 15:07:17 +02:00
EricFromCanada
68947f2af9 cmd/options: add flag to list a command's options 2020-06-28 12:42:23 -04:00
Mike McQuaid
a7fe0ed847
cmd: use more and cleanup new args APIs. 2020-03-05 09:40:15 +00:00
Gautham Goli
22e25dd593 argv: move formulae to cli/args 2019-12-11 16:36:23 +05:30
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
329c6c78be manpages: relocate some sections
Reorder switches as force/quiet/verbose/debug, --installed before --all, and link to SPECIFYING FORMULAE from top of page.
2019-08-20 08:58:20 -04:00
EricFromCanada
ee314617f7 manpages: update command usage strings 2019-08-20 08:55:54 -04:00
EricFromCanada
6520785307 manpages: grammar fixes 2019-08-20 08:26:26 -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
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
Gautham Goli
5fbbe888f1
options: Use CLI::Parser to parse args 2018-11-07 21:59:04 +05:30
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Dominyk Tiller
d9074b80b7
options: pass explicit sort to handle APFS 2017-10-14 06:35:33 +01:00
Markus Reiter
0ab750bf24 Use module_function for commands. 2016-10-02 00:24:47 +02:00
Max Nordlund
fa1fd70a37 Add all the top level comments 2016-04-10 22:59:25 +02:00
Baptiste Fontaine
b7e98b129c cmd/options.rb: move common code in options.rb
Closes Homebrew/homebrew#47423.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-12-27 22:16:46 +01:00
BrewTestBot
13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Xu Cheng
cb73e38cfc options: use Formula#full_name 2015-05-29 17:02:22 +08:00
Kyungdahm Yun
a70a805111 Capitalize descriptions of --HEAD, --devel
Closes Homebrew/homebrew#35027.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-12-16 12:22:29 -05:00
Jack Nagel
2f1d40a764 Disconnect defined options from the build object 2014-08-10 21:45:24 -05:00
Jack Nagel
e34a497b3e Prefer interpolation 2014-08-07 00:11:14 -05:00
Jack Nagel
10a1952d2c Only "extend self" once on the Homebrew module 2014-06-19 13:10:36 -05:00
Adam Vandenberg
6aa2277119 options: show --HEAD and --devel when appropriate
Closes Homebrew/homebrew#24680.
2013-12-15 19:42:08 -08:00
Jack Nagel
ce4b621874 Clean up brew options 2013-06-26 15:11:34 -05:00
Jack Nagel
46476ae4d0 Fix brew options --all
Fixes Homebrew/homebrew#18625.
2013-03-20 22:32:56 -05:00
Jack Nagel
3c04d14cc9 options: sort options consistently 2013-01-14 15:08:13 -06:00
Max Howell
9274f7cda1 Formula.Enumerable
Deprecated Formula.all, replaced usage with more appropriate enumerable options. Just check out how much nicer `brew audit` runs now.
2012-08-21 12:09:05 -04:00
Jack Nagel
3f9e88ae69 Simplify build options API
Simplify access to the different forms of a formula's build options by
making options into real objects rather than strings, and expose both
the 'name' and 'flag' form.
2012-08-20 14:16:08 -05:00
Misty De Meo
a3ca4f0872 options: Print "--" in option name for --compact
This was a regression which caused the bash completion script to
fail to complete formula options.
2012-08-13 12:45:53 -05:00
Misty De Meo
d1c0d4c879 Fix normalization of old- and new-style options
When combining the set of old-style and new-style options, make sure
that the leading "--" is stripped.

Fixes displaying options in `brew options`, and the exotic case of
declaring options using the old syntax and then checking them with
`build.include?`
2012-08-11 16:54:03 -05:00
Misty De Meo
5882ae901f options: Don't add "--" to options that have it 2012-08-11 14:13:40 -05:00
Jack Nagel
c5eb0b880a options: fix missing leading "--" in output
Closes Homebrew/homebrew#14124.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-11 10:29:21 -05:00
Adam Vandenberg
e196c845bf Fix info/options for new options dsl 2012-08-09 09:24:27 -07:00
Adam Vandenberg
d1d52b3467 Add option to the DSL
Closes Homebrew/homebrew#9982
2012-08-08 22:01:27 -07:00
Max Howell
4b5052f614 Show options for foo with brew info foo
About time right?
2012-08-04 15:40:36 -04:00
Jack Nagel
1a3a1249bf Warn the user of required arguments
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-04 00:27:05 -06:00
Jack Nagel
75a7c33e6a options: treat outdated brews as installed
`brew options --installed` will now "do the right thing".

There is getting to be a small but noticeable amount of code duplication
among commands that take options like "--installed" or "--all"; it may
be worth factoring this out into a method that will return a collection
of formula objects based on the options that are passed.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-22 19:29:10 -06:00
Jack Nagel
b0f5566566 brew-options: add --installed flag
`brew options --installed` will print options for formulae that are
already installed.

Closes Homebrew/homebrew#7565.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-12 15:43:18 -05:00
Jack Nagel
adb85c7f38 brew-options: actually skip formulae with no options
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-11 16:25:20 -05:00
Adam Vandenberg
6fda61cde4 brew options: allow --all 2011-03-19 09:58:42 -07:00
Adam Vandenberg
87398e7436 'brew options' now an official command 2011-03-12 11:55:10 -08:00