Skip to content

Commit 471115c

Browse files
authored
Merge pull request #687 from twpol/feature/command-line-syntax-5
fix: Clean up Content Checker help output to match dotnet-style
2 parents 712b9e5 + 2cbce1f commit 471115c

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

Source/ContentChecker/Program.cs

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
using System.IO;
2222
using System.Linq;
2323
using Orts.Common;
24-
using Orts.Parsers.Msts;
24+
using ORTS.Common;
2525

2626
namespace ContentChecker
2727
{
@@ -77,21 +77,25 @@ static bool OptionsContain(string[] args, IEnumerable<string> optionNames) {
7777
/// </summary>
7878
static void ShowHelp()
7979
{
80-
Console.WriteLine("Open Rails File Loader and Cross-check utility");
80+
var version = FileVersionInfo.GetVersionInfo(typeof(Program).Assembly.Location);
81+
Console.WriteLine("{0} {1}", version.FileDescription, VersionInfo.VersionOrBuild);
8182
Console.WriteLine();
82-
Console.WriteLine("{0} [<option> ...] FILE [...]", Path.GetFileNameWithoutExtension(AppDomain.CurrentDomain.FriendlyName));
83+
Console.WriteLine("Usage:");
84+
Console.WriteLine(" {0} [options] <FILE> [...]", Path.GetFileNameWithoutExtension(version.FileName));
85+
Console.WriteLine();
86+
Console.WriteLine("Arguments:");
87+
Console.WriteLine(" <FILE> Data files to check; may contain wildcards");
8388
Console.WriteLine();
84-
// "1234567890123456789012345678901234567890123456789012345678901234567890123456789"
8589
Console.WriteLine("Options:");
86-
Console.WriteLine(" /h, /help Show help.");
87-
Console.WriteLine(" /v, /verbose Displays all expected/valid values in addition to any errors");
88-
Console.WriteLine(" /d, /dependent Also load dependent files.");
90+
Console.WriteLine(" /h, /help Show help.");
91+
Console.WriteLine(" /v, /verbose Displays all expected/valid values in addition to any errors");
92+
Console.WriteLine(" /d, /dependent Also load dependent files");
8993
Console.WriteLine("");
9094
Console.WriteLine("Partially implemented options:");
91-
Console.WriteLine(" /r, /referenced Also load files that are directly referenced");
92-
Console.WriteLine(" This implies /d");
93-
Console.WriteLine(" /a, /all Load all related files");
94-
Console.WriteLine(" This implies /d and /r");
95+
Console.WriteLine(" /r, /referenced Also load files that are directly referenced");
96+
Console.WriteLine(" This implies /d");
97+
Console.WriteLine(" /a, /all Load all related files");
98+
Console.WriteLine(" This implies /d and /r");
9599
Console.WriteLine("");
96100
Console.WriteLine("This utility needs as input one or more files.");
97101
Console.WriteLine("You can either give a file with a full path or with a relative path.");

0 commit comments

Comments
 (0)