Skip to content

Commit

Permalink
perf: 命令帮助参数 -? 改为 -h
Browse files Browse the repository at this point in the history
  • Loading branch information
nopdan committed Jan 26, 2024
1 parent a2f8efe commit af6cd04
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/ImeWlConverterCmd/bin/Debug/netcoreapp3.0/ImeWlConverterCmd.dll",
"args": ["-?"],
"args": ["-h"],
"cwd": "${workspaceFolder}/src/ImeWlConverterCmd",
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
"console": "internalConsole",
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ RUN set -ex \

ENTRYPOINT ["ImeWlConverterCmd"]

CMD ["-?"]
CMD ["-h"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

</div>

本程序支持批量转换(一次拖拽多个词库文件,或者按住 Ctrl 选择多个文件),支持命令行模式(在命令行下使用-?命令查看帮助),支持 Windows、Linux、MacOS。
本程序支持批量转换(一次拖拽多个词库文件,或者按住 Ctrl 选择多个文件),支持命令行模式(在命令行下使用-h命令查看帮助),支持 Windows、Linux、MacOS。

### 支持列表

Expand Down
6 changes: 3 additions & 3 deletions src/ImeWlConverterCore/ConsoleRun.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void Run()
{
if (Args.Length == 0)
{
Console.WriteLine("输入 -? 可获取帮助");
Console.WriteLine("输入 -h 可获取帮助");
return;
}
for (int i = 0; i < Args.Length; i++)
Expand Down Expand Up @@ -143,7 +143,7 @@ public void Run()
}
Console.WriteLine("转换完成,共转换" + mainBody.Count + "个");
}
Console.WriteLine("输入 -? 可获取帮助");
Console.WriteLine("输入 -h 可获取帮助");
}

private void MainBody_ProcessNotice(string message)
Expand All @@ -153,7 +153,7 @@ private void MainBody_ProcessNotice(string message)

private CommandType RunCommand(string command)
{
if (command == "--help" || command == "-?")
if (command == "--help" || command == "-h")
{
showHelp(this.cbxImportItems);
return CommandType.Help;
Expand Down

0 comments on commit af6cd04

Please sign in to comment.