Ruoyu Zhong
06610bf807
cmd/--version: use ShellCommand
2024-07-15 14:48:36 -04:00
Mike McQuaid
5987c5c1d0
Add stub Ruby commands for all Bash commands.
...
This gets us pretty similar (but easier to manage) manpage output but
much nicer completions etc. for all these commands.
2024-07-14 23:12:53 -04:00
Mike McQuaid
dc1fdc9f8d
Speedup brew --version
.
...
Port `brew --version` to Bash to speed it up.
While we're here:
- remove (now) unused `Tap` Git methods
- use `--quiet` instead of `-q` to be more verbose
Benchmarks:
```
$ hyperfine --min-runs=3 --warmup=2 "git checkout origin/master; brew --version" "git checkout speedup_brew_version; brew --version"
Benchmark #1 : git checkout origin/master; brew --version
Time (mean ± σ): 2.083 s ± 0.004 s [User: 396.8 ms, System: 597.2 ms]
Range (min … max): 2.080 s … 2.088 s 3 runs
Benchmark #2 : git checkout speedup_brew_version; brew --version
Time (mean ± σ): 847.9 ms ± 35.2 ms [User: 100.0 ms, System: 247.9 ms]
Range (min … max): 824.1 ms … 888.3 ms 3 runs
Summary
'git checkout speedup_brew_version; brew --version' ran
2.46 ± 0.10 times faster than 'git checkout origin/master; brew --version'
```
2021-03-04 12:59:42 +00:00
Rylan Polster
d1f3e39b7b
Update commands to generate usage banner
2021-01-18 21:20:11 -05: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
EricFromCanada
72bc057014
manpage: fixes for formatting
2020-11-16 08:02:50 -05:00
Markus Reiter
da9289eff0
Add more type signatures.
2020-11-13 12:26:36 +01:00
Markus Reiter
24ae318a3d
Move type annotations into files.
2020-10-10 14:59:39 +02:00
EricFromCanada
aea6d79d21
option parser: check for extra named args
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
EricFromCanada
6520785307
manpages: grammar fixes
2019-08-20 08:26:26 -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
dbd8de7148
--version: use CLI::Parser.
2019-01-30 21:38:45 +00:00
Markus Reiter
ac2cd67861
Deprecate brew cask --version
.
2018-09-06 07:05:22 +02:00
Markus Reiter
c53a52daee
Move --version
logic into cmd/--version.rb
.
2018-05-21 05:35:44 +02:00
Markus Reiter
0ab750bf24
Use module_function
for commands.
2016-10-02 00:24:47 +02:00
Martin Afanasjew
312fdaa892
--version: move help to documentation comment
...
This implies that `--version` is treated in most places like a regular
command, e.g. being suggested in shell completion. Also fix the help
text that claimed output goes to standard error, while it actually goes
to standard output.
2016-04-20 13:45:26 +02:00