Fix program name duplicate in the output of "mailutils help COMMAND"
Showing
1 changed file
with
5 additions
and
3 deletions
... | @@ -35,15 +35,17 @@ mutool_help (int argc, char **argv) | ... | @@ -35,15 +35,17 @@ mutool_help (int argc, char **argv) |
35 | 35 | ||
36 | if (argc == 1) | 36 | if (argc == 1) |
37 | { | 37 | { |
38 | char *hargv[3]; | ||
38 | mutool_action_t action = dispatch_find_action (argv[0]); | 39 | mutool_action_t action = dispatch_find_action (argv[0]); |
39 | if (!action) | 40 | if (!action) |
40 | { | 41 | { |
41 | mu_error (_("don't know what %s is"), argv[0]); | 42 | mu_error (_("don't know what %s is"), argv[0]); |
42 | exit (1); | 43 | exit (1); |
43 | } | 44 | } |
44 | mu_asprintf (&argv[0], "%s %s", mu_program_name, argv[0]); | 45 | hargv[0] = argv[0]; |
45 | argv[1] = "--help"; | 46 | hargv[1] = "--help"; |
46 | return action (2, argv); | 47 | hargv[2] = NULL; |
48 | return action (3, hargv); | ||
47 | } | 49 | } |
48 | else if (argc > 1) | 50 | else if (argc > 1) |
49 | { | 51 | { | ... | ... |
-
Please register or sign in to post a comment