-
Notifications
You must be signed in to change notification settings - Fork 7
feat(info, search, install, uninstall): add json output option #246
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
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.
Seems nice!
Shell completion needs to be updated.
amoeba
left a comment
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.
Works great, nice one.
Two suggestions for style and we should also update the shell completions and docs.
Here's a patch for the docs,
diff --git a/docs/reference/cli.md b/docs/reference/cli.md
index 1137183..f8bb8b8 100644
--- a/docs/reference/cli.md
+++ b/docs/reference/cli.md
@@ -66,6 +66,10 @@ $ dbc search [FILTER]
<h3>Options</h3>
+`--json`
+
+: Print output as JSON instead of plaintext
+
`--verbose`, `-v`
: Enable verbose output
@@ -255,6 +259,10 @@ $ dbc info <DRIVER>
<h3>Options</h3>
+`--json`
+
+: Print output as JSON instead of plaintext
+
`--quiet`, `-q`
: Suppress all output
amoeba
left a comment
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.
Is this ready for another review? I think this looks good now so +1.
cmd/dbc/completions/dbc.bash
Outdated
| COMPREPLY=($(compgen -W "user system" -- "$cur")) | ||
| return 0 | ||
| ;; | ||
| ;; |
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.
Maybe unnecessary spaces?
Co-authored-by: Bryce Mecum <petridish@gmail.com>
Co-authored-by: Bryce Mecum <petridish@gmail.com>
Add
--jsonoptions for output of info and search subcommands