Skip to content

Commit 553bd03

Browse files
Improved command helptext formatting and indicate option multiple use with +
1 parent e34e718 commit 553bd03

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Src/VSoft.CommandLine.Options.pas

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ class procedure TOptionsRegistry.PrintUsage(const command: ICommandDefinition; c
348348
if command.HelpText <> '' then
349349
begin
350350
proc('');
351-
proc(' ' + command.HelpText);
351+
proc(command.HelpText);
352352
end;
353353
proc('');
354354
proc('Options:');
@@ -390,6 +390,11 @@ class procedure TOptionsRegistry.PrintUsage(const command: ICommandDefinition; c
390390

391391
if opt.HasValue then
392392
s := s + FNameValueSeparator + '<' + opt.LongName + '>';
393+
if opt.AllowMultiple then
394+
s := s + ' +'
395+
else
396+
s := s + ' ';
397+
393398
s := PadRight(s, FDescriptionTab);
394399
s := s + descStrings[0];
395400
proc(s);

0 commit comments

Comments
 (0)