Skip to content

Commit

Permalink
feat(cli): add -h and --help flag
Browse files Browse the repository at this point in the history
  • Loading branch information
dbohdan committed Sep 28, 2023
1 parent 3387530 commit 2146f0b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,10 @@ int main(int argc, char** argv)
return 0;
}

if (argc == 2 && str_prefix("help", argv[1])) {
if (argc == 2
&& (str_prefix("help", argv[1])
|| strcmp(argv[1], "-h") == 0
|| strcmp(argv[1], "--help") == 0)) {
help();
return 0;
}
Expand Down

0 comments on commit 2146f0b

Please sign in to comment.