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 only subcommand flags with bash completion #1186

Merged
merged 2 commits into from Apr 22, 2022

Conversation

schollz
Copy link
Contributor

@schollz schollz commented Sep 17, 2020

What type of PR is this?

  • bug

What this PR does / why we need it:

On subcommands the bash completion for flags shows global flags which cannot be used. This change makes sure that only subcommand flags are shown.

Which issue(s) this PR fixes:

Fixes #1184

Special notes for your reviewer:

None.

Testing

I tested the change with my program, croc to see if the subcommands (croc send --) correctly complete the flags for subcommands.

Release Notes

bug fix: show only subcommand flags with bash completion

@schollz schollz requested a review from a team as a code owner Sep 17, 2020
@schollz schollz requested review from saschagrunert and coilysiren and removed request for a team Sep 17, 2020
@schollz
Copy link
Contributor Author

schollz commented Nov 13, 2020

Is this blocked for some reason?

rliebz
rliebz previously approved these changes Nov 13, 2020
@coilysiren
Copy link
Member

coilysiren commented Jan 27, 2021

@schollz can you add a test case for this?

Copy link
Member

@coilysiren coilysiren left a comment

(requesting changes for the test case)

@schollz
Copy link
Contributor Author

schollz commented Jan 29, 2021

@schollz can you add a test case for this?

Sorry, no I cannot. Feel free to close

@stale
Copy link

stale bot commented Jun 2, 2021

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 2, 2021
@stale
Copy link

stale bot commented Jul 4, 2021

Closing this as it has become stale.

@stale stale bot closed this Jul 4, 2021
@meatballhat meatballhat reopened this Apr 19, 2022
@meatballhat meatballhat added kind/bug describes or fixes a bug area/v2 relates to / is being considered for v2 and removed status/stale stale due to the age of it's last update labels Apr 21, 2022
@meatballhat meatballhat added this to the Release 2.5.0 milestone Apr 21, 2022
@meatballhat meatballhat changed the base branch from master to main Apr 21, 2022
@meatballhat meatballhat dismissed rliebz’s stale review Apr 21, 2022

The base branch was changed.

meatballhat added a commit that referenced this pull request Apr 22, 2022
meatballhat added a commit that referenced this pull request Apr 22, 2022
show only subcommand flags with bash completion (#1186)
@meatballhat meatballhat merged commit 7a231c5 into urfave:main Apr 22, 2022
11 of 12 checks passed
dearchap pushed a commit to dearchap/cli that referenced this pull request Apr 24, 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/bug describes or fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to get autocomplete to not show global flags for subcommand?
4 participants