accept single '-' as argument, such as in cat -
(#153)
This commit is contained in:
parent
5950d78558
commit
0edf37b6cc
@ -1723,7 +1723,7 @@ ParseResult::parse(int& argc, char**& argv)
|
||||
//not a flag
|
||||
|
||||
// but if it starts with a `-`, then it's an error
|
||||
if (argv[current][0] == '-') {
|
||||
if (argv[current][0] == '-' && argv[current][1] != '\0') {
|
||||
throw option_syntax_exception(argv[current]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user