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

Show non categorized flags with categorized on help #1673

Merged
merged 3 commits into from Jan 29, 2023
Merged

Show non categorized flags with categorized on help #1673

merged 3 commits into from Jan 29, 2023

Conversation

skelouse
Copy link
Contributor

@skelouse skelouse commented Jan 29, 2023

What type of PR is this?

  • bug
  • feature

What this PR does / why we need it:

Reverting the removal of visible flags from help if their sibling flags have categories defined.

Example:

App:
    Flags:
        Flag1: // non categorized
        Flag2: Category1
        
Help Before PR:
    Options:
      Category1
        Flag2
        
Help After:
    Options:
        Flag1
      
      Category1
        Flag2

Which issue(s) this PR fixes:

fixes #1672

Release Notes

Reverted removal of non categorized flags alongside categorized flags

@skelouse skelouse requested a review from a team as a code owner January 29, 2023 08:22
@skelouse skelouse changed the title V2 maint Show non categorized flags with categorized on help Jan 29, 2023
category.go Show resolved Hide resolved
@dearchap
Copy link
Contributor

I think the main concern is whether empty string should be counted as a category. I am ok with either but it would be good if some stakeholders can chime in on this cc @urfave/cli

@dearchap dearchap merged commit 2389448 into urfave:v2-maint Jan 29, 2023
@skelouse
Copy link
Contributor Author

v2.24.2? @dearchap

mudler pushed a commit to kairos-io/provider-kairos that referenced this pull request Jan 30, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/urfave/cli/v2](https://togithub.com/urfave/cli) | require
| patch | `v2.24.1` -> `v2.24.2` |

---

### Release Notes

<details>
<summary>urfave/cli</summary>

### [`v2.24.2`](https://togithub.com/urfave/cli/releases/tag/v2.24.2)

[Compare
Source](https://togithub.com/urfave/cli/compare/v2.24.1...v2.24.2)

#### What's Changed

- Update README badges for v2 by
[@&#8203;meatballhat](https://togithub.com/meatballhat) in
[urfave/cli#1664
- Target two most recent Go versions in v2 by
[@&#8203;meatballhat](https://togithub.com/meatballhat) in
[urfave/cli#1666
- flag: remove dependencies on shared variables by
[@&#8203;zllovesuki](https://togithub.com/zllovesuki) in
[urfave/cli#1671
- Show non categorized flags with categorized on help by
[@&#8203;skelouse](https://togithub.com/skelouse) in
[urfave/cli#1673

#### New Contributors

- [@&#8203;zllovesuki](https://togithub.com/zllovesuki) made their first
contribution in
[urfave/cli#1671

**Full Changelog**:
urfave/cli@v2.24.1...v2.24.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/kairos-io/provider-kairos).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMDguNCIsInVwZGF0ZWRJblZlciI6IjM0LjExNi4xIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@tarampampam
Copy link
Contributor

@dearchap Apologies for the necroposting, but it seems that v3.0.0-alpha7 still faces the same issue. At least, flags without categories are not printed when at least one flag has it. Could you please confirm this, and if so, could you create an issue to address this?

Or will it be better if I will do that?

/cc @jetexe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants