mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 20:01:27 +00:00
Return 1 on unrecognized option
This commit is contained in:
parent
2a4cc85659
commit
8cba83f43f
|
@ -3437,7 +3437,6 @@ static void usage(void)
|
|||
" -v show program version\n"
|
||||
" -h show this help\n\n"
|
||||
"Version: %s\n%s\n", VERSION, GENERAL_INFO);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
@ -3494,9 +3493,12 @@ int main(int argc, char *argv[])
|
|||
case 'v':
|
||||
fprintf(stdout, "%s\n", VERSION);
|
||||
return 0;
|
||||
case 'h': // fallthrough
|
||||
case 'h':
|
||||
usage();
|
||||
return 0;
|
||||
default:
|
||||
usage();
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue