diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2018-11-28 08:18:01 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2018-11-28 08:18:01 +0530 |
commit | 8cba83f43f7fca3f73698872da4e7f7c03faea38 (patch) | |
tree | 314525ab277dad868b31d3233f5a14f95a7faeb6 | |
parent | 2a4cc85659f247704811da02338a8137908522b8 (diff) | |
download | nnn-8cba83f43f7fca3f73698872da4e7f7c03faea38.tar.gz |
Return 1 on unrecognized option
-rw-r--r-- | src/nnn.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); } } |