Skip to content

Conversation

@mikecluck
Copy link
Contributor

@mikecluck mikecluck commented Jan 14, 2026

What type of PR is this?

(REQUIRED)

  • bug

What this PR does / why we need it:

(REQUIRED)

  • help.go was changed so that if a command does not have usage information, it will not show a separator

When getting completions for commands, I was getting some confusing output:

$ wizard <tab>
bags     potions  spells   wands  --

To me, it looked like there should be a command named --. After adding usage to a couple of them, I realized what was going on

$ wizard <tab>
bags             -- Bags for holding things                                                                                                                                                                                                                                                         
potions  spells  --                                                                                                                                                                                                                                                                                 
wands            -- Tools for wielding magic   

Which still looks weird. The ones without any usage still get a -- separator. My change ensures that the -- is only shown if there is associated usage information.

$ wizard <tab>
bags     potions  spells   wands

$ wizard <tab>
bags     -- Bags for holding things
wands    -- Tools for wielding magic
potions  spells

Which issue(s) this PR fixes:

(REQUIRED)

N/A

Release Notes

(REQUIRED)

Removed redundant separator in shell completions

@mikecluck mikecluck requested a review from a team as a code owner January 14, 2026 16:15
Copy link
Contributor

@dearchap dearchap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mikecluck

@dearchap dearchap merged commit fa7e0b1 into urfave:main Jan 18, 2026
9 checks passed
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.

2 participants