Replace "--newlinesoff" with an assignable argument ("--newlines=on/off")
This commit is contained in:
parent
88d22e6183
commit
2cf523bf17
|
@ -25,7 +25,14 @@ int main(int argc, char* argv[]) {
|
||||||
else Yerbacon::exit({"No target was provided."});
|
else Yerbacon::exit({"No target was provided."});
|
||||||
}
|
}
|
||||||
else if (currentArg == Argument("parallel")) parallel = true;
|
else if (currentArg == Argument("parallel")) parallel = true;
|
||||||
else if (currentArg == Argument("newlinesoff")) newLines = false;
|
else if (currentArg == ArgumentAssignable("newlines")) {
|
||||||
|
const string_view enabled = ArgumentAssignable::getValueFor(currentArg);
|
||||||
|
if (enabled == "off") {
|
||||||
|
newLines = false;
|
||||||
|
} else if (enabled == "on") {
|
||||||
|
newLines = true;
|
||||||
|
} else goto invalid_argument;
|
||||||
|
}
|
||||||
else if (currentArg.ends_with(".ybcon")) files.insert(currentArg);
|
else if (currentArg.ends_with(".ybcon")) files.insert(currentArg);
|
||||||
else {
|
else {
|
||||||
if (argc == 2) {
|
if (argc == 2) {
|
||||||
|
|
Loading…
Reference in New Issue