diff --git a/src/fish_indent.cpp b/src/fish_indent.cpp index dd46abddb..a7a393375 100644 --- a/src/fish_indent.cpp +++ b/src/fish_indent.cpp @@ -341,7 +341,7 @@ int main(int argc, char *argv[]) { break; } case 'h': { - print_help("fish_indent", 1); + print_help("fish_indent"); exit(0); } case 'v': { diff --git a/src/fish_key_reader.cpp b/src/fish_key_reader.cpp index 186cb85a0..4299a8ff1 100644 --- a/src/fish_key_reader.cpp +++ b/src/fish_key_reader.cpp @@ -312,7 +312,7 @@ static bool parse_flags(int argc, char **argv, bool *continuous_mode, bool *verb break; } case 'h': { - print_help("fish_key_reader", 1); + print_help("fish_key_reader"); exit(0); } case 'v': { diff --git a/src/print_help.cpp b/src/print_help.cpp index 0b2fa3c71..541d047e8 100644 --- a/src/print_help.cpp +++ b/src/print_help.cpp @@ -14,9 +14,9 @@ #define HELP_ERR "Could not show help message\n" -void print_help(const char *c, int fd) { +void print_help(const char *c) { char cmd[CMD_LEN]; - int printed = snprintf(cmd, CMD_LEN, "fish -c '__fish_print_help %s >&%d'", c, fd); + int printed = snprintf(cmd, CMD_LEN, "fish -c '__fish_print_help %s'", c); if (printed < CMD_LEN && system(cmd) == -1) { write_loop(2, HELP_ERR, std::strlen(HELP_ERR)); diff --git a/src/print_help.h b/src/print_help.h index 9c5a62298..b7067ffcd 100644 --- a/src/print_help.h +++ b/src/print_help.h @@ -3,6 +3,6 @@ #define FISH_PRINT_HELP_H /// Print help message for the specified command. -void print_help(const char *cmd, int fd); +void print_help(const char *cmd); #endif