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

Don't generate completions for args with AppSettings::Hidden #2541

Closed
2 tasks done
jonner opened this issue Jun 16, 2021 · 4 comments
Closed
2 tasks done

Don't generate completions for args with AppSettings::Hidden #2541

jonner opened this issue Jun 16, 2021 · 4 comments
Labels
A-completion Area: completion generator C-bug Category: Updating dependencies E-easy Call for participation: Experience needed to fix: Easy / not much S-duplicate Status: Closed as Duplicate

Comments

@jonner
Copy link

jonner commented Jun 16, 2021

Please complete the following tasks

  • I have searched the discussions
  • I have searched the existing issues

Describe your use case

I have an "internal" subcommand for my application that is hidden from help output using clap::AppSettings::Hidden. But when generating bash completions, this hidden command is included.

Describe the solution you'd like

Don't generate completion for the hidden subcommand.

Alternatives, if applicable

No response

Additional Context

No response

@pksunkara
Copy link
Member

Need the version you are looking at because this is fixed in master.

@tranzystorekk
Copy link
Contributor

@pksunkara Could you point to the fix commit? I tried this out on clap 3.0.0-rc.3 and completions are still generated for hidden apps

@epage epage reopened this Dec 10, 2021
@epage epage added A-completion Area: completion generator C-bug Category: Updating dependencies E-easy Call for participation: Experience needed to fix: Easy / not much labels Dec 10, 2021
@epage
Copy link
Member

epage commented Dec 10, 2021

Going to re-close this but because it is also covered in #1335

@epage epage closed this as completed Dec 10, 2021
@pksunkara
Copy link
Member

I think we went back on the decision regarding this and are currently generating hidden subcommands too.

@epage epage added the S-duplicate Status: Closed as Duplicate label Jan 11, 2022
lgarron added a commit to lgarron/folderify that referenced this issue Apr 4, 2023
Thanks to clap-rs/clap#4090 (comment) for the info on how to do that.

Unfortunately, it still shows up in shell completions:

- clap-rs/clap#1335
- clap-rs/clap#2541 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-completion Area: completion generator C-bug Category: Updating dependencies E-easy Call for participation: Experience needed to fix: Easy / not much S-duplicate Status: Closed as Duplicate
Projects
None yet
Development

No branches or pull requests

4 participants