# HG changeset patch # User Mike Becker # Date 1744132252 -7200 # Node ID 55dc85743dd1f0479ee5d04afdd544eda4b13511 # Parent e4592d0292e78fc4842785d0a4677d6062f2d991 do not treat unknown option as directory - fixes #635 diff -r e4592d0292e7 -r 55dc85743dd1 src/cline.c --- a/src/cline.c Mon Apr 07 20:43:52 2025 +0200 +++ b/src/cline.c Tue Apr 08 19:10:52 2025 +0200 @@ -245,6 +245,11 @@ add_string(settings->regex->pattern_list, "^\\s*$"); add_string(settings->regex->pattern_list, "$"); } + /* Unknown option */ + else if (argv[t][0] == '-') { + fprintf(stderr, "Unrecognized option: %s\n\n", argv[t]); + return exit_with_help(settings, 1); + } /* Path */ else { add_string(directories, argv[t]);