1 Commits

Author SHA1 Message Date
e74fc4f35a feat: Added --format, -f flag.
Allows printing data in tabular or json format.
2026-06-25 17:51:31 -04:00
5 changed files with 19 additions and 19 deletions

View File

@@ -1,32 +1,34 @@
# TODOs
1. Bring back windows support / cross-compilation.
1. Commands are still leaking. (Write tests for everything first)
2. Commands are still leaking. (Write tests for everything first)
2. Add color flag and support non colored output.
3. procedures should be ordered by use, main at the top, then in the order they are called from main.
3. Rewrite `write_command_help` to use text/tables
4. Check for prealloc opportunities. i.e. `make([dynamic]string)` -> `make([dynamic]string, 5)`.
4. Generate md and man pages again.
5. Test all cmds / terminal branches.
5. Check for prealloc opportunities. i.e. `make([dynamic]string)` -> `make([dynamic]string, 5)`.
6. Generate md and man pages again.
6. Add a text filter to the multi_select.
7. Shell completion
7. Add tests for untested commands.
8. Add tests for untested commands.
8. add --format -f flag to commands that draw tables.
9. Update `read_wire_string` to use a slice.
9. procedures should be ordered by use, main at the top, then in the order they are called from main.
10. Pass allocator to findr?
10. Shell completion
11. Smarter flag parsing?
11. Bring back windows support / cross-compilation.
12. Rewrite `write_command_help` to use text/tables
12. Test all cmds / terminal branches.
13. Add color flag and support non colored output.
13. Pass allocator to findr?
14. Add a text filter to the multi_select.
14. Update `read_wire_string` to use a slice.
15. `-h` short flag seems to fail, at least with `envr list`
## Double-check AI output

View File

@@ -123,7 +123,7 @@ parse_args :: proc(args: []string, out: io.Stream, err: io.Stream) -> (cmd: Comm
cmd.config_path = default_config_path(home, context.temp_allocator)
}
if has_flag(&cmd, "help") || has_flag(&cmd, "h") {
if has_flag(&cmd, "help") {
print_command_help(&cmd)
return cmd, false
}

View File

@@ -172,7 +172,7 @@ db_close :: proc(db: ^Db) {
}
sz: i64
data := sqlite.serialize(db.conn, "main", &sz, {})
data := sqlite.serialize(db.conn, "main", &sz, 0)
if data == nil {
fmt.eprintln("Error: failed to serialize database")
return

View File

@@ -196,7 +196,7 @@ test_db_serialize :: proc(t: ^testing.T) {
db_insert(&db, f)
sz: i64
data := sqlite.serialize(db.conn, "main", &sz, {})
data := sqlite.serialize(db.conn, "main", &sz, 0)
testing.expect(t, data != nil, "serialize should return non-nil")
if data == nil do return
defer sqlite.free(data)

View File

@@ -75,8 +75,6 @@
];
buildInputs = [
pkgs.git
pkgs.libsodium
mysqlite
];