Skip to content

Commit 652ce88

Browse files
committed
fix help
1 parent bf840c4 commit 652ce88

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

pbn/PbnApplication.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public enum AnalysisFormat
161161
PsBridge
162162
}
163163

164-
[Option("analysis-format", HelpText = "The format of the analysis output.\n Accepted options:\n " +
164+
[Option("analysis-format", HelpText = "The format of the analysis output.\nAccepted options:\n" +
165165
"'ability' for Ability and Minimax Tags\n" +
166166
"'psbridge' for PS Bridge analysis")]
167167
public AnalysisFormat DdsAnalysisFormat { get; set; } = AnalysisFormat.Ability;
@@ -174,14 +174,14 @@ public enum AnalysisFormat
174174
_ => throw new ArgumentOutOfRangeException()
175175
};
176176

177-
[Option('r', "--renumber", HelpText = "Renumber boards, use +/-x to shift numbers, x to assign new numbers")]
177+
[Option('r', "renumber", HelpText = "Renumber boards, use +/-x to shift numbers, x to assign new numbers")]
178178
public string? Renumber { get; set; }
179179

180-
[Option('d', "--delete-boards", Separator = Separator,HelpText = "Delete boards, accepts numbers or number ranges")]
180+
[Option('d', "delete-boards", Separator = Separator,HelpText = "Delete boards, accepts numbers or number ranges")]
181181
public IEnumerable<string>? DeleteBoards { get; set; }
182182

183183
[Value(1, MetaName = "output-file",
184-
HelpText = "Output file name, if not specified, the program will use the input file name")]
184+
HelpText = "Output file name, if not specified, the program will use standard output")]
185185
public string? Output { get; set; }
186186

187187
[Option('w', "overwrite", HelpText = "Overwrite the input file with output")]

pbn/Program.cs

+4-7
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ private static void Main(string[] args)
1212
{
1313
//ignore case for enum values
1414
with.CaseInsensitiveEnumValues = true;
15+
with.AutoHelp = true;
16+
with.HelpWriter = Parser.Default.Settings.HelpWriter;
1517
});
16-
18+
1719
parser.ParseArguments<Options>(args)
18-
.WithParsed(RunOptions)
19-
.WithNotParsed(HandleParseError);
20+
.WithParsed(RunOptions);
2021

2122
}
2223

@@ -47,8 +48,4 @@ private static void RunOptions(Options opts)
4748
}
4849
}
4950

50-
private static void HandleParseError(IEnumerable<Error> errs)
51-
{
52-
// do nothing
53-
}
5451
}

pbn/pbn.csproj

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
1212
<PublishReadyToRun>true</PublishReadyToRun>
1313
<Title>pbn</Title>
14+
<Version>0.1.2</Version>
15+
<Authors>Zdenek Tomis</Authors>
1416
</PropertyGroup>
1517

1618
<ItemGroup>

0 commit comments

Comments
 (0)