Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag Groups #259

Closed
cpuguy83 opened this issue Jul 15, 2015 · 12 comments · Fixed by #1368
Closed

Flag Groups #259

cpuguy83 opened this issue Jul 15, 2015 · 12 comments · Fixed by #1368
Assignees
Labels
area/v2 relates to / is being considered for v2 kind/feature describes a code enhancement / feature request status/in-review needs to be reviewed by maintainers before it is accepted
Milestone

Comments

@cpuguy83
Copy link
Contributor

It might be nice to be able to have command.Flags be a [][]Flag for the purposes of being able to group flags in the command help output.
In addition instead of a straight up [][]Flag, a new FlagGroup struct type may be better, where we can define a name/other fields.

WDYT?

@jszwedko
Copy link
Contributor

I think it would be nice to be able to group flags, but I also wouldn't want to create overhead for, what I'm guessing is, the majority case that doesn't need to group their flags.

What might be better is making the library more flexible such that additional properties could be assigned to flags and then custom help templates could be created that organize them.

@hickeng
Copy link

hickeng commented Oct 9, 2016

@jszwedko a mechanism like the command categories would do nicely. In fact I thought categories were for flags originally having read the docs too quickly.
IMO there are likely to be three distinct styles of CLI use where grouping is important:

  1. lots of sub commands, few flags per command
  2. few commands, large number of flags per command
  3. lots of commands, large number of flags per command

IMO (2) and (3) are likely to be were most of the complexity lies, particularly if you have overlapping sets of flags that are shared between commands, meaning even lexical ordering of related arguments is problematic.

@jszwedko
Copy link
Contributor

👍 I tend to agree now -- I'd be open to a PR that introduced the analogous category functionality to flags that exists for commands.

@michaeljs1990
Copy link
Contributor

#796 adds this functionality for those who want to use it.

@coilysiren coilysiren added kind/feature describes a code enhancement / feature request status/claimed someone has claimed this issue labels Aug 17, 2019
@coilysiren coilysiren added help wanted please help if you can! status/confirmed confirmed to be valid, but work has yet to start status/in-review needs to be reviewed by maintainers before it is accepted and removed status/claimed someone has claimed this issue help wanted please help if you can! status/confirmed confirmed to be valid, but work has yet to start labels Sep 10, 2019
@coilysiren
Copy link
Member

This feature is now in review - @urfave/cli please add a 👍 or 👎 to the top post if you're in favor or against this feature being added!

@coilysiren coilysiren added the area/v2 relates to / is being considered for v2 label Nov 27, 2019
@stale
Copy link

stale bot commented Feb 25, 2020

This issue or PR has been automatically marked as stale because it has not had recent activity. Please add a comment bumping this if you're still interested in it's resolution! Thanks for your help, please let us know if you need anything else.

@stale stale bot added the status/stale stale due to the age of it's last update label Feb 25, 2020
@coilysiren
Copy link
Member

coilysiren commented Feb 26, 2020

This looks like its still in limbo pending more interest?

@stale
Copy link

stale bot commented Feb 26, 2020

This issue or PR has been bumped and is no longer marked as stale! Feel free to bump it again in the future, if it's still relevant.

@stale stale bot removed the status/stale stale due to the age of it's last update label Feb 26, 2020
@AkihiroSuda
Copy link
Contributor

What's current status?
#796 seems closed due to inactivity.

@coilysiren
Copy link
Member

What's current status?

To expand on my comment 9 days ago, this issue is waiting on someone interested in refining the proposal and advocating for it 🙂 You are free to do that, if you are so inclined.

#796 seems closed due to inactivity.

Yes, if you would like to restart the activity there then you are free to do so!

@stale
Copy link

stale bot commented Jun 4, 2020

This issue or PR has been automatically marked as stale because it has not had recent activity. Please add a comment bumping this if you're still interested in it's resolution! Thanks for your help, please let us know if you need anything else.

@stale stale bot added the status/stale stale due to the age of it's last update label Jun 4, 2020
@stale
Copy link

stale bot commented Jul 4, 2020

Closing this as it has become stale.

@stale stale bot closed this as completed Jul 4, 2020
@meatballhat meatballhat reopened this Apr 22, 2022
@meatballhat meatballhat removed the status/stale stale due to the age of it's last update label Apr 22, 2022
@meatballhat meatballhat added this to the Release 2.5.0 milestone Apr 22, 2022
@meatballhat meatballhat self-assigned this Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/v2 relates to / is being considered for v2 kind/feature describes a code enhancement / feature request status/in-review needs to be reviewed by maintainers before it is accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants