mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 14:01:20 -03:00
Exit key reader normally on help, version
This commit is contained in:
committed by
David Adam
parent
bd472ececc
commit
ad020e84dd
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user