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

Bash completion doesn't work for subcommands of subcommands #1617

Closed
3 tasks done
tchandelle opened this issue Dec 7, 2022 · 3 comments
Closed
3 tasks done

Bash completion doesn't work for subcommands of subcommands #1617

tchandelle opened this issue Dec 7, 2022 · 3 comments
Labels
area/v2 relates to / is being considered for v2 kind/bug describes or fixes a bug status/claimed someone has claimed this issue status/triage maintainers still need to look into this

Comments

@tchandelle
Copy link

My urfave/cli version is

github.com/urfave/cli/v2 v2.23.6

Checklist

  • Are you running the latest v2 release? The list of releases is here.
  • Did you check the manual for your release? The v2 manual is here
  • Did you perform a search about this problem? Here's the GitHub guide about searching.

Dependency Management

  • My project is using go modules.

Describe the bug

Bash completion (arg --generate-bash-completion and option EnableBashCompletion) does not provide completion for subcommands of subcommands.

To reproduce

https://go.dev/play/p/aO7adBNLVCf

Observed behavior

It returns commands below alpha.

$ ./app alpha beta --generate-bash-completion
beta
help
h

Expected behavior

It should returns commands below beta (ie. gamma)

$ ./app alpha beta --generate-bash-completion
gamma
help
h

Run go version and paste its output here

$ go version
go version go1.18.8 darwin/amd64
@tchandelle tchandelle added area/v2 relates to / is being considered for v2 kind/bug describes or fixes a bug status/triage maintainers still need to look into this labels Dec 7, 2022
@dearchap dearchap added the status/claimed someone has claimed this issue label Dec 7, 2022
@dearchap
Copy link
Contributor

dearchap commented Dec 7, 2022

@tchandelle Can you check if PR fixes your issue ? Thanks

@tchandelle
Copy link
Author

Thanks @dearchap, that was fast! Yes it works!

@dearchap
Copy link
Contributor

@tchandelle v2.23.7 has the fix. Thanks for raising the issue

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 status/claimed someone has claimed this issue status/triage maintainers still need to look into this
Projects
None yet
Development

No branches or pull requests

2 participants