-
-
Notifications
You must be signed in to change notification settings - Fork 122
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: clap_completion #1056
base: main
Are you sure you want to change the base?
feat: clap_completion #1056
Conversation
Questions about this PR:
Is there an alternate approach I haven't considered that you would like me to try? |
@TwistingTwists can you please resolve conflicts and update your branch? |
Yup. will do by EOD |
... so that pb completions can add chat completions via clap_complete - Need to refactor Config struct
619993b
to
d202b8f
Compare
Unresolved Questions about this PR:
if there is an alternate you would like me to try, please let me know. |
- Fish: `pb util completion fish | source` | ||
- Nushell: | ||
```nu | ||
pb util completion nushell | save "completions-pb.nu" |
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.
pb
is a different cli tool, a client to the parseable(server) actually.
Can we have a argument/flag similar to --help
that when set will print the completions for the specific shell. i.e.
parseable --shell-completion-config nushell | save "parseable-completions.nu"
this way we can continue to use the CLI as is, setting the default behavior of the CLI to be "don't output" when the flag is not set.
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.
This is also a good way to do this, rather than adding a command. I'll implement this.
|
||
impl ShellCompletion { | ||
pub fn generate(&self, cmd: &mut clap::Command) -> Vec<u8> { | ||
use clap_complete::generate; |
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.
clap_complete
is missing?
No issue created yet.
Description
Adding auto completion for the cli - to ease developer UX.
This PR has: