brew icon indicating copy to clipboard operation
brew copied to clipboard

cli/parser: Allow `comma_array` to take multiple names

Open issyl0 opened this issue 3 years ago • 4 comments

  • [x] Have you followed the guidelines in our Contributing document?
  • [x] Have you checked to ensure there aren't other open Pull Requests for the same change?
  • [x] Have you added an explanation of what your changes do and why you'd like us to include them?
  • [x] Have you written new tests for your changes? Here's an example.
  • [x] Have you successfully run brew style with your changes locally?
  • [x] Have you successfully run brew typecheck with your changes locally?
  • [x] Have you successfully run brew tests with your changes locally?

  • This came up when developing brew contributions, the --repositories flag (comma array) is long to type. It turned out that unlike normal flags, comma_arrays didn't allow multiple arg names.
  • Now in brew contributions (and potentially elsewhere, though I've not had a look) we can make the args easier to type by letting --repositories and --repos equate to the same thing.

issyl0 avatar Aug 09 '22 22:08 issyl0

Review period will end on 2022-08-10 at 22:07:22 UTC.

BrewTestBot avatar Aug 09 '22 22:08 BrewTestBot

@Rylan12 I thought about this, but since they were already separate I assumed there was a design choice in the past that we didn't want them to share.

issyl0 avatar Aug 10 '22 18:08 issyl0

@Rylan12 I thought about this, but since they were already separate I assumed there was a design choice in the past that we didn't want them to share.

I guess it's possible, but tbh I bet it was just oversight. It looks like this is pretty much exactly how it was when it was added and I don't really see any discussion about it, so I think it was just an arbitrary choice.

Rylan12 avatar Aug 10 '22 18:08 Rylan12

Review period ended.

BrewTestBot avatar Aug 11 '22 00:08 BrewTestBot

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Sep 01 '22 00:09 github-actions[bot]