feat: add argument metadata to (most) commands that take parameters

This commit is contained in:
CJ van den Berg 2024-11-21 17:34:11 +01:00
parent ae91afe255
commit 150374afae
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
14 changed files with 85 additions and 78 deletions

View file

@ -19,7 +19,7 @@ pub const Entry = struct {
pub fn load_entries(palette: *Type) !void {
for (command.commands.items) |cmd_| if (cmd_) |p| {
if (p.meta.interactive)
if (p.meta.description.len > 0)
(try palette.entries.addOne()).* = .{
.label = if (p.meta.description.len > 0) p.meta.description else p.name,
.name = p.name,