Skip to content

Commit 7dbde06

Browse files
committed
Rename print-synopsis to print-help
1 parent 014c500 commit 7dbde06

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

command-line-parser.dylan

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ define function process-tokens
754754
if (instance?(option, <help-option>))
755755
// Handle --help early in case the remainder of the command line is
756756
// invalid or there are missing required arguments.
757-
print-synopsis(parser, subcmd);
757+
print-help(parser, subcmd);
758758
abort-command(0);
759759
end;
760760
parse-option(option, parser);

help.dylan

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ define method execute-subcommand
6868
if (name)
6969
let subcmd = find-subcommand(parser, name);
7070
if (subcmd)
71-
print-synopsis(parser, subcmd);
71+
print-help(parser, subcmd);
7272
else
7373
usage-error("Subcommand %= not found.", name);
7474
end;
7575
else
76-
print-synopsis(parser, #f); // 'app help' same as 'app --help'
76+
print-help(parser, #f); // 'app help' same as 'app --help'
7777
end;
7878
end method;
7979

@@ -146,10 +146,10 @@ define method format-option-usage
146146
option.canonical-option-name
147147
end;
148148

149-
define open generic print-synopsis
149+
define open generic print-help
150150
(parser :: <command-line-parser>, subcmd :: false-or(<subcommand>), #key stream);
151151

152-
define method print-synopsis
152+
define method print-help
153153
(parser :: <command-line-parser>, subcmd == #f,
154154
#key stream :: <stream> = *standard-output*)
155155
format(stream, "%s\n", parser.command-help);
@@ -177,7 +177,7 @@ define method print-synopsis
177177
end;
178178
end method;
179179

180-
define method print-synopsis
180+
define method print-help
181181
(parser :: <command-line-parser>, subcmd :: <subcommand>,
182182
#key stream :: <stream> = *standard-output*)
183183
format(stream, "%s\n", subcmd.command-help);

library.dylan

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ define module command-line-parser
6969
add-option,
7070
parse-command-line,
7171
get-option-value,
72-
print-synopsis,
72+
print-help,
7373

7474
parse-option-value;
7575

tests/command-line-parser-test-suite.dylan

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ end test test-command-line-parser;
8989
define test test-synopsis-format ()
9090
let parser = make-parser();
9191
let synopsis = with-output-to-string (stream)
92-
print-synopsis(parser, #f, stream: stream)
92+
print-help(parser, #f, stream: stream)
9393
end;
9494
let expected = #:str:"x
9595

0 commit comments

Comments
 (0)