Conversation
e0ab8ce to
ece4d05
Compare
There was a problem hiding this comment.
How about not outputting formulae or casks if they are zero? Just an idea (and I can be talked out of it)
There was a problem hiding this comment.
I like this idea. How about adding a command count, too? Like:
Tapped 3 casks.
Tapped 14 casks and 2 commands.
Untapped 2349 formulae.
Untapped 2673 formulae and 5 commands.
aedab91 to
dd04532
Compare
|
Also added commands. |
There was a problem hiding this comment.
array_comma_and or something to me would read a bit more obviously; I was a bit confused as to what enumeration meant.
There was a problem hiding this comment.
The &.prepend(" ") is neat; I wonder if it's worth making this an optional parameter for Formatter.enumeration
dd04532 to
85aec4c
Compare
There was a problem hiding this comment.
Is there an upstream bug you can link to here?
8d8c64d to
0e45d0a
Compare
0e45d0a to
9d79cf1
Compare
MikeMcQuaid
left a comment
There was a problem hiding this comment.
A few non-blocking comments
| info += ", private" if tap.private? | ||
| if (formula_count = tap.formula_files.size).positive? | ||
| info += ", #{Formatter.pluralize(formula_count, "formula")}" | ||
| if (contents = tap.contents).empty? |
|
|
||
| formula_count = formula_files.size | ||
| puts "Tapped #{Formatter.pluralize(formula_count, "formula")} (#{path.abv})" unless quiet | ||
| formatted_contents = Formatter.comma_and(*contents)&.prepend(" ") |
There was a problem hiding this comment.
Thoughts about the prepend being part of comma_and?
There was a problem hiding this comment.
I don't think it's worth it.
There was a problem hiding this comment.
My thinking was it's currently an accessory function where the only use is with the prepend?
There was a problem hiding this comment.
Still, I think it‘s not worth it:
Formatter.comma_and(*contents)&.prepend(" ")vs.
Formatter.comma_and(*contents, prepend: " ")and a more complex comma_and.
brew stylewith your changes locally?brew testswith your changes locally?Also show cask count when tapped in addition to
0 formulae.