23 Commits

Author SHA1 Message Date
Mike McQuaid
45b66870bb
Improve "unknown command" error
Clarify it is a `brew` command.

Fixes #17627
2024-07-05 08:20:28 +01:00
Mike McQuaid
4ffcd8a110
Various improvements for brew command
- Add a (large) speedup by moving some logic to Bash for the typical
  case of a normal or dev-cmd, Bash or Ruby command.
- Make `brew command` a non-developer command, I don't think it makes
  sense to consider it something needed for developing Homebrew.
- Update the manpage/tests/RBI accordingly.

Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2024-04-30 11:38:19 +01:00
Mike McQuaid
85e65f6d9c
Move some cmd to dev-cmd.
None of these made sense as end-user commands.
2020-04-14 14:29:38 +01:00
Mike McQuaid
a7fe0ed847
cmd: use more and cleanup new args APIs. 2020-03-05 09:40:15 +00:00
Mike McQuaid
8a9dcad2c7
Move more command handling logic to commands.rb. 2020-02-02 17:05:45 +01:00
EricFromCanada
0c8eae8d9c command: handle multiple named args 2019-12-15 00:04:45 -05:00
EricFromCanada
2f7c3afeb8 cmd: improve wording of messages, spacing 2019-12-15 00:04:45 -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
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
Gautham Goli
b1a36a13e2
command: Use CLI::Parser to parse args 2019-01-20 20:08:14 +05:30
Mike McQuaid
7a68b4a3f9 Refactor command handling code
Don’t rely on having external commands always present in the PATH in
order to find them. Instead, provide an accessory method to Tap so
they can be added and used when needed.

While we’re here, do some general refactoring and cleanup of the
command code in these places.
2017-11-05 15:37:57 +00:00
Markus Reiter
0ab750bf24 Use module_function for commands. 2016-10-02 00:24:47 +02:00
Mike McQuaid
49dcbee99c command: use Commands module. 2016-09-08 20:46:55 +01:00
Mike McQuaid
4f6bae46f9 cmd/*: don't restrict dev-cmd to Homebrew developers. 2016-09-08 20:46:37 +01:00
Max Nordlund
fa1fd70a37 Add all the top level comments 2016-04-10 22:59:25 +02:00
Baptiste Fontaine
5775d3b326 command: support .sh commands
Closes Homebrew/homebrew#48192.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-20 22:27:13 +01:00
Baptiste Fontaine
f629bb4e0f command: fail early if no command is given
Closes Homebrew/homebrew#44450.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-10-06 09:58:05 +02:00
Xu Cheng
ce390b9bd9 add dev-cmd folder 2015-09-12 19:15:45 +08:00
Xu Cheng
14f060621e command: fix break caused by style update 2015-08-03 20:51:16 +08: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
78a7dea3a0 add brew command
Closes Homebrew/homebrew#41034.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-07-03 14:22:38 +08:00