cli_completion
cli_completion copied to clipboard
feat: Add "print completion" command.
Description
Some CLIs choose not to auto-install the completion files but rather to expose a command where a completion script is printed in the stdout.
Then a CLI user's usage would be like this:
my_cli completion-script >> ~/.zshrc
Requirements
- [ ] Add this command if and only if auto-install is deactivated
Additional Context
The same approach used by NPM and GH CLI, among others
As described by this comment: https://github.com/VeryGoodOpenSource/cli_completion/issues/47#issuecomment-1406254675
This would be awesome to have!