-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat(cli): add completions
command to jstz
#382
Conversation
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.
🎉 🥳 Awesome!
Happy to merge on the grounds that merged is better than not merged.
I had to install a couple of things to get it to work
brew install --cask autodmg
brew install compiledb
Could I suggest the following additions (if possible) before you close the ticket
- Add whatever is necessary to our
nix
to work in thenix-shell
- Add something to the makefile so that
target/debug/jstz
andtarget/release/jstz
are set up for you.
If that's not possible or a pain to do then don't worry
f844594
to
d206ac7
Compare
If you're using direnv (as you ought to be), then the shell is configured externally to nix
This is possible, I can probably set it up for zsh. But perhaps in a different PR? |
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.
LGTM!
|
|
d206ac7
to
50ab39c
Compare
Context
Related Tasks: Shell autocompletions for CLI
Description
This PR adds a
completions
command tojstz
, which prints the autocompletions for the CLI to stdoutManually testing the PR
Since we don't yet globally install jstz as a binary, it's a bit finicky to test locally.
For zsh:
To use the completions, you must use
./target/debug/jstz [Tab]
([Tab] denotes you pressing tab). I've not been able to get this to work withcargo run --bin jstz -- ...
For other shells:
clap-rs/clap#2488 (comment)