diff --git a/src/fish_indent.cpp b/src/fish_indent.cpp index fa4b79ae6..d1285dd7d 100644 --- a/src/fish_indent.cpp +++ b/src/fish_indent.cpp @@ -575,7 +575,7 @@ int main(int argc, char *argv[]) { exit(0); } case 'v': { - std::fwprintf(stderr, _(L"%ls, version %s\n"), program_name, get_fish_version()); + std::fwprintf(stdout, _(L"%ls, version %s\n"), program_name, get_fish_version()); exit(0); } case 'w': { diff --git a/src/fish_key_reader.cpp b/src/fish_key_reader.cpp index 2ecaa5756..4521621e4 100644 --- a/src/fish_key_reader.cpp +++ b/src/fish_key_reader.cpp @@ -284,13 +284,12 @@ static bool parse_flags(int argc, char **argv, bool *continuous_mode) { break; } case 'h': { - print_help("fish_key_reader", 0); - error = true; - break; + print_help("fish_key_reader", 1); + exit(0); } case 'v': { - std::fwprintf(stdout, L"%s\n", get_fish_version()); - return false; + std::fwprintf(stdout, _(L"%ls, version %s\n"), program_name, get_fish_version()); + exit(0); } default: { // We assume getopt_long() has already emitted a diagnostic msg.