Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions help.dylan
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ define function print-help
if (~empty?(names))
let name-width = reduce1(max, map(size, names));
for (name in names, doc in docs)
format(stream, "%s %s\n", pad-right(name, name-width), doc);
if (empty?(doc))
format(stream, "%s\n", name);
else
format(stream, "%s %s\n", pad-right(name, name-width), doc);
end;
end;
end;
format(stream, "\n");
Expand Down Expand Up @@ -256,9 +260,8 @@ define function subcommand-columns
add!(docs, subcmd.command-help);
if (subcmd.has-subcommands?)
loop(subcmd.command-subcommands, concatenate(indent, " "));
else
loop(tail(subs), indent)
end;
loop(tail(subs), indent)
end;
end iterate;
values(names, docs)
Expand Down
10 changes: 10 additions & 0 deletions pkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"category": "utilities",
"contact": "[email protected]",
"deps": ["[email protected]"],
"description": "Command line processing",
"keywords": ["cli", "flags"],
"name": "command-line-parser",
"version": "3.1.0",
"url": "https://github.com/dylan-lang/command-line-parser"
}