Skip to content

Commit

Permalink
Emergent fix for --version
Browse files Browse the repository at this point in the history
  • Loading branch information
ccmywish committed Aug 23, 2024
1 parent 6579e52 commit a59265a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/chsrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,12 +601,18 @@ main (int argc, char const *argv[])
CliOpt_NoColor = true;
xy_enable_color = false;
}
else if (xy_streql (argv[i], "-h")
else if (xy_streql (argv[i], "-h")
|| xy_streql (argv[i], "-help")
|| xy_streql (argv[i], "--help"))
{
command = "help"; /* 交到下方处理 */
}
else if (xy_streql (argv[i], "-v")
|| xy_streql (command, "-version")
|| xy_streql (command, "--version"))
{
command = "version"; /* 交到下方处理 */
}
else
{
char *msg = CliOpt_InEnglish ? "Unknown option: " : "未识别的命令行选项 ";
Expand Down

0 comments on commit a59265a

Please sign in to comment.