mirror of
https://github.com/sbrow/envr.git
synced 2026-06-27 18:48:33 -04:00
refactor: Used RTTI for more sophisticated flag parsing.
This commit is contained in:
@@ -14,7 +14,7 @@ ListEntry :: struct {
|
||||
|
||||
// TODO: Improve table rendering
|
||||
cmd_list :: proc(cmd: ^Command) {
|
||||
db, db_ok := db_open(cmd.config_path)
|
||||
db, db_ok := db_open(cmd.flags.config_file)
|
||||
if !db_ok {
|
||||
return
|
||||
}
|
||||
@@ -25,7 +25,7 @@ cmd_list :: proc(cmd: ^Command) {
|
||||
return
|
||||
}
|
||||
|
||||
if get_format(cmd) == .Table {
|
||||
if cmd.flags.output == .Table {
|
||||
t: table.Table
|
||||
table.init(&t, context.temp_allocator, context.temp_allocator)
|
||||
table.padding(&t, 1, 1)
|
||||
|
||||
Reference in New Issue
Block a user