diff --git a/TODOS.md b/TODOS.md index 48fd3be..8714e4c 100644 --- a/TODOS.md +++ b/TODOS.md @@ -20,7 +20,7 @@ 10. Pass allocator to findr? -11. `-h` short flag seems to fail, at least with `envr list` +11. Smarter flag parsing? 12. Rewrite `write_command_help` to use text/tables diff --git a/cli.odin b/cli.odin index aaf52e3..8aafece 100644 --- a/cli.odin +++ b/cli.odin @@ -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 } diff --git a/db_test.odin b/db_test.odin index 7807a4b..a7af5fd 100644 --- a/db_test.odin +++ b/db_test.odin @@ -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)