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

[feature] shell completion #337

Open
Freed-Wu opened this issue May 17, 2022 · 4 comments
Open

[feature] shell completion #337

Freed-Wu opened this issue May 17, 2022 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Freed-Wu
Copy link

Now, scc has many command options. If it can provide shell completion (bash/zsh/fish/...), it will be more convenient to use. Thanks.

@boyter
Copy link
Owner

boyter commented May 18, 2022

@Freed-Wu Do you have any details on how to achieve such a thing?

@boyter boyter added enhancement New feature or request help wanted Extra attention is needed labels May 18, 2022
@Freed-Wu
Copy link
Author

Maybe https://docs.rs/clap_complete/latest/clap_complete can be helpful?

Or that projects support completions (e.g. ripgrep, fd, exa, github-cli, etc) can be a reference.

@boyter
Copy link
Owner

boyter commented May 23, 2022

Ah... thats what you mean. I think this is pretty easy https://jmtirado.net/shell-completion-with-cobra-and-go/

@Freed-Wu
Copy link
Author

Great. Such as https://github.com/cli/cli/blob/cf4b73ff958b272cf3c9c0cf9351459f76b793a0/pkg/cmd/completion/completion.go?

@boyter boyter added this to ToDo in Release 3.2.0 Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
No open projects
Development

No branches or pull requests

2 participants