4 Commits

Author SHA1 Message Date
581967a58d nix: Fixed the nix build. 2026-06-25 18:08:08 -04:00
6ec09309dd fix: -h short flag now works on subcommands. 2026-06-25 18:07:31 -04:00
c5020bd6a6 chore: Re-numbered todos. 2026-06-25 18:00:54 -04:00
d5981d7b88 feat: Added --format, -f flag.
Allows printing data in tabular or json format.
2026-06-25 17:53:44 -04:00
5 changed files with 19 additions and 19 deletions

View File

@@ -1,34 +1,32 @@
# TODOs
1. Commands are still leaking. (Write tests for everything first)
1. Bring back windows support / cross-compilation.
2. Add color flag and support non colored output.
2. Commands are still leaking. (Write tests for everything first)
3. Rewrite `write_command_help` to use text/tables
3. procedures should be ordered by use, main at the top, then in the order they are called from main.
4. Generate md and man pages again.
4. Check for prealloc opportunities. i.e. `make([dynamic]string)` -> `make([dynamic]string, 5)`.
5. Check for prealloc opportunities. i.e. `make([dynamic]string)` -> `make([dynamic]string, 5)`.
5. Test all cmds / terminal branches.
6. Add a text filter to the multi_select.
6. Generate md and man pages again.
7. Add tests for untested commands.
7. Shell completion
8. add --format -f flag to commands that draw tables.
8. Add tests for untested commands.
9. procedures should be ordered by use, main at the top, then in the order they are called from main.
9. Update `read_wire_string` to use a slice.
10. Shell completion
10. Pass allocator to findr?
11. Bring back windows support / cross-compilation.
11. Smarter flag parsing?
12. Test all cmds / terminal branches.
12. Rewrite `write_command_help` to use text/tables
13. Pass allocator to findr?
13. Add color flag and support non colored output.
14. Update `read_wire_string` to use a slice.
15. `-h` short flag seems to fail, at least with `envr list`
14. Add a text filter to the multi_select.
## 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") {
if has_flag(&cmd, "help") || has_flag(&cmd, "h") {
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, 0)
data := sqlite.serialize(db.conn, "main", &sz, {})
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, 0)
data := sqlite.serialize(db.conn, "main", &sz, {})
testing.expect(t, data != nil, "serialize should return non-nil")
if data == nil do return
defer sqlite.free(data)

View File

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