Skip to content

Conversation

@hougesen
Copy link
Contributor

@hougesen hougesen commented Oct 20, 2024

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Problem/Feature

This PR updates the version of github.com/spf13/cobra to the latest (1.8.1), since it has support for automatic shell completion generation.

Merging this will close #336.

Description of Changes:

  • Updated github.com/spf13/cobra to v1.8.1
  • Documented usage of completion command

Checklist

  • My code follows the Contribution Guide
  • I have self-reviewed the changes being requested
  • I have made comments on pieces of code that may be difficult to understand for other editors
  • I have updated the documentation (if applicable)

@Xemdo
Copy link
Contributor

Xemdo commented Nov 9, 2024

Since we can detect what system/shell you're on anyway, should we consider doing this automatically using Cobra's completion generation functions instead?

@hougesen
Copy link
Contributor Author

Are you talking about removing the need for specifying the shell when running twitch completion, or automatically generating shell completions on install?

If the former, I would personally expect all users that wish to have shell completion to already know which shell they use, reducing the need for simplifying the command.

@Xemdo Xemdo merged commit a367bec into twitchdev:main Jan 11, 2025
4 checks passed
@hougesen hougesen deleted the feat/shell-completion branch January 12, 2025 23:18
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.

Cobra subcommand completion?

2 participants