Skip to content

Commit 5c73d5b

Browse files
committed
Copyedits to --help
see 2b25d09
1 parent 06b975e commit 5c73d5b

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

src/BizHawk.Client.Common/ArgParser.cs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static class ArgParser
1818
private static readonly Argument<string?> ArgumentRomFilePath = new("rom")
1919
{
2020
DefaultValueFactory = _ => null,
21-
Description = "path; if specified, the file will be loaded the same way as it would be from `File` > `Open...`",
21+
Description = "path; if specified, the file will be loaded the same way as it would be from `File` > `Open...`; this argument can and should be given LAST despite what it says at the top of --help",
2222
};
2323

2424
private static readonly Option<string?> OptionAVDumpAudioSync = new("--audiosync")
@@ -49,7 +49,7 @@ public static class ArgParser
4949

5050
private static readonly Option<bool> OptionGDIPlus = new("--gdi")
5151
{
52-
Description = "pass to use the GDI+ display method rather than whatever preference is set in the config file",
52+
Description = "use the GDI+ display method rather than whatever preference is set in the config file",
5353
};
5454

5555
private static readonly Option<string?> OptionHTTPClientURIGET = new("--url-get", "--url_get")
@@ -64,12 +64,12 @@ public static class ArgParser
6464

6565
private static readonly Option<bool> OptionLaunchChromeless = new("--chromeless")
6666
{
67-
Description = "pass and the 'chrome' (a.k.a. GUI) will never be shown, not even in windowed mode",
67+
Description = "never show the GUI (a.k.a. 'chrome'), not even in windowed mode",
6868
};
6969

7070
private static readonly Option<bool> OptionLaunchFullscreen = new("--fullscreen")
7171
{
72-
Description = "pass to launch in fullscreen",
72+
Description = "launch in fullscreen",
7373
};
7474

7575
private static readonly Option<int?> OptionLoadQuicksaveSlot = new("--load-slot")
@@ -98,7 +98,7 @@ public static class ArgParser
9898

9999
private static readonly Option<bool> OptionOpenLuaConsole = new("--luaconsole")
100100
{
101-
Description = "pass to open the Lua Console",
101+
Description = "open the Lua Console, even if not loading a script",
102102
};
103103

104104
private static readonly Option<bool> OptionQueryAppVersion = new("--version")
@@ -123,15 +123,17 @@ static ArgParser()
123123
OptionAVDumpName.Description = $"ignored unless `{OptionAVDumpType.Name}` also passed";
124124
OptionAVDumpType.Description = $"ignored unless `{OptionAVDumpName.Name}` also passed";
125125
OptionLoadSavestateFilePath.Description = $"path; savestate which should be loaded on launch; this takes precedence over `{OptionLoadQuicksaveSlot.Name}`";
126-
OptionLuaFilePath.Description = $"implies `{OptionOpenLuaConsole.Name}`";
126+
OptionLuaFilePath.Description = $"path; Lua script or Console session to load; implies `{OptionOpenLuaConsole.Name}`";
127127
OptionSocketServerIP.Description = $"string; IP address for Unix socket IPC (Lua `comm.socket*`); must be paired with `{OptionSocketServerPort.Name}`";
128128
OptionSocketServerPort.Description = $"int; port for Unix socket IPC (Lua `comm.socket*`); must be paired with `{OptionSocketServerIP.Name}`";
129129
OptionSocketServerUseUDP.Description = $"pass to use UDP instead of TCP for Unix socket IPC (Lua `comm.socket*`); ignored unless `{OptionSocketServerIP.Name} {OptionSocketServerPort.Name}` also passed";
130130
}
131131

132132
private static RootCommand GetRootCommand()
133133
{
134-
RootCommand root = new("BizHawk, a multi-system emulator frontend");
134+
RootCommand root = new($"{
135+
(string.IsNullOrEmpty(VersionInfo.CustomBuildString) ? "EmuHawk" : VersionInfo.CustomBuildString)
136+
}, a multi-system emulator frontend\n{VersionInfo.GetEmuVersion()}");
135137
root.Add(ArgumentRomFilePath);
136138
root.Options.RemoveAll(option => option is VersionOption); // we have our own version command
137139

@@ -191,14 +193,14 @@ private static void EnsureConsole()
191193
}
192194
if (result.Action is not null)
193195
{
196+
// means e.g. `./EmuHawkMono.sh --help` was passed, run whatever behaviour it normally has
194197
EnsureConsole();
195-
// means e.g. `./EmuHawkMono.sh --help` was passed, run whatever behaviour it normally has...
196198
return result.Invoke();
197199
}
198200
if (result.GetValue(OptionQueryAppVersion))
199201
{
200-
EnsureConsole();
201202
// means e.g. `./EmuHawkMono.sh --version` was passed, so print that and exit immediately
203+
EnsureConsole();
202204
Console.WriteLine(VersionInfo.GetEmuVersion());
203205
return 0;
204206
}

0 commit comments

Comments
 (0)