scc icon indicating copy to clipboard operation
scc copied to clipboard

[feature] shell completion

Open Freed-Wu opened this issue 2 years ago • 4 comments

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

Freed-Wu avatar May 17 '22 05:05 Freed-Wu

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

boyter avatar May 18 '22 00:05 boyter

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.

Freed-Wu avatar May 23 '22 01:05 Freed-Wu

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

boyter avatar May 23 '22 22:05 boyter