Skip to content

Commit 6cb195a

Browse files
authored
Merge pull request #25 from cgay/dev
A few small fixes
2 parents 738fc84 + 908d056 commit 6cb195a

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

help.dylan

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,11 @@ define function print-help
161161
if (~empty?(names))
162162
let name-width = reduce1(max, map(size, names));
163163
for (name in names, doc in docs)
164-
format(stream, "%s %s\n", pad-right(name, name-width), doc);
164+
if (empty?(doc))
165+
format(stream, "%s\n", name);
166+
else
167+
format(stream, "%s %s\n", pad-right(name, name-width), doc);
168+
end;
165169
end;
166170
end;
167171
format(stream, "\n");
@@ -256,9 +260,8 @@ define function subcommand-columns
256260
add!(docs, subcmd.command-help);
257261
if (subcmd.has-subcommands?)
258262
loop(subcmd.command-subcommands, concatenate(indent, " "));
259-
else
260-
loop(tail(subs), indent)
261263
end;
264+
loop(tail(subs), indent)
262265
end;
263266
end iterate;
264267
values(names, docs)

pkg.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"category": "utilities",
3+
"contact": "dylan-lang@googlegroups.com",
4+
"deps": ["strings@1.0"],
5+
"description": "Command line processing",
6+
"keywords": ["cli", "flags"],
7+
"name": "command-line-parser",
8+
"version": "3.1.0",
9+
"url": "https://github.com/dylan-lang/command-line-parser"
10+
}

0 commit comments

Comments
 (0)