Tweak commands

This commit is contained in:
2025-03-15 14:41:43 +01:00
parent cc5c711d32
commit 9e880467d9
10 changed files with 169 additions and 13 deletions

View File

@ -42,8 +42,14 @@ class GroupFindCommand extends Command
foreach ($groups as $group) {
$row = [];
foreach ($keys as $key) {
$row[] = isset($group[$key]) ? json_encode($group[$key]) : null;
$row[] = isset($group[$key]) ? $group[$key] : null;
}
$row = array_map(fn($v) => match(true) {
is_bool($v) => "<fg=magenta>".($v?"true":"false")."</>",
is_int($v) => "<fg=cyan>{$v}</>",
is_string($v) => "<fg=yellow>{$v}</>",
default => $v,
}, $row);
$table->addRow($row);
}