Print command line completions by lihaohong6 · Pull Request #606 · boyter/scc
It depends on the shell (and possibly the operating system). I'm using Linux through WSL to experiment, so hopefully the procedure is more-or-less the same on macOS if that's what you use.
For zsh, which is what I usually use, I would
- Run
./scc completion --shell zsh > _sccto generate shell completions and pipe the output to a file. Underscore + name of executable is usually howzshcompletion files are named. - Run
sudo cp _scc /usr/share/zsh/site-functions/_scc. This copies the completions file to the location wherezshcompletion scripts are stored. There are ways to havezshload completion scripts without superuser privileges, but this is the easiest. - Restart the shell.
- Type
scc --no-and then press tab. Something along the lines of the screenshot below should appear.

I have a bunch of zsh plugins, so hopefully this applies to a vanilla zsh experience too.
Other shells are pretty similar. For bash, the command would be ./scc completion --shell bash > scc.bash, and the file would be stored in /usr/share/bash-completion/completions. bash requires a double tab to autocomplete, and shows something similar. I haven't customized bash, so this should be easier to reproduce.
For fish, the command is ./scc completion --shell fish > scc.fish and the file location is /usr/share/fish/vendor_completions.d. My fish is a fresh install, so it should be easily reproducible.
Technically powershell is supported too, but I'm not familiar with that ecosystem. Since everything is autogenerated anyway, I would assume cobra did it correctly.

