Skip to content

Conversation

@zeroshade
Copy link
Member

Add --json options for output of info and search subcommands

Copy link
Member

@eitsupi eitsupi left a 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.

Copy link
Member

@amoeba amoeba left a 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

@zeroshade zeroshade changed the title feat(info, search): add json output option feat(info, search, install, uninstall): add json output option Jan 11, 2026
Copy link
Member

@amoeba amoeba left a 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.

COMPREPLY=($(compgen -W "user system" -- "$cur"))
return 0
;;
;;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe unnecessary spaces?

@zeroshade zeroshade merged commit 5eafdb5 into main Jan 19, 2026
10 checks passed
@zeroshade zeroshade deleted the some-json branch January 19, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants