mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Exit key reader normally on help, version
This commit is contained in:
parent
bd472ececc
commit
ad020e84dd
2 changed files with 5 additions and 6 deletions
|
@ -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': {
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue