-
Notifications
You must be signed in to change notification settings - Fork 217
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
Add shell completions #2107
Add shell completions #2107
Conversation
This is already mentioned in our user guide: https://github.com/input-output-hk/cardano-wallet/wiki/Wallet-command-line-interface Also, I'd rather give the command to generate the auto-completion scripts than the scripts themselves, don't you think ? |
That's only for bash afais.
I think either is fine. I don't have a strong opinion, but it seems the upstream doc suggests to ship the output:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I think this makes more sense than having it in the wiki. Nice to have zsh + fish too! 🙏
We should generate the completion scripts for all shells for all programs when building the release archives. This could be done with nix or travis - choose your poison. That will be more helpful to users than having these scripts in either the git repo or the wiki. |
@rvl are you gonna take a shot at that? I'm not familiar with either of those. |
I can coach you if you have time. Travis is just glorified shell scripts embedded in YAML. Nix is just shell scripts embedded in an obscure functional language - start looking in |
``` cardano-wallet-linux64 ├── auto-completion │ ├── bash │ │ └── cardano-wallet.sh │ ├── fish │ │ └── cardano-wallet.fish │ └── zsh │ └── _cardano-wallet └── cardano-wallet ``` So that users can simply copy-paste them into whatever shell they use.
d0d0f5c
to
4ccd3d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed in DMs with @hasufell on Slack. Approving my own changes on his behalf.
bors merge |
2107: Add shell completions r=KtorZ a=hasufell This is created via optpars-applicative, see: https://github.com/pcapriotti/optparse-applicative/wiki/Bash-Completion Co-authored-by: KtorZ <[email protected]>
Build failed:
|
Try the integration tests again... bors r+ |
Build succeeded: |
This is created via optpars-applicative, see:
https://github.com/pcapriotti/optparse-applicative/wiki/Bash-Completion