Adds support for force color argument
This commit is contained in:
parent
7e1597531d
commit
e386078eb6
|
@ -22,6 +22,7 @@ int main(int argc, char** argv) {
|
|||
args::ValueFlag<std::string> workingDirFlag(parser, "Working Directory", "Which work directory to use.",
|
||||
{"workdir"});
|
||||
args::Flag logTimeFlag(parser, "time-log", "Whether to show time logging.", {'t', "time-log"});
|
||||
args::Flag forceColorFlag(parser, "force-color", "Whether to force color text output.", {'c', "force-color"});
|
||||
try {
|
||||
parser.ParseCLI(argc, argv);
|
||||
} catch (args::Help&) {
|
||||
|
@ -42,6 +43,9 @@ int main(int argc, char** argv) {
|
|||
if (!workingDirectory.empty()) {
|
||||
chdir((const char*)std::filesystem::path(workingDirectory).c_str());
|
||||
}
|
||||
if (forceColorFlag.Get()){
|
||||
termcolor::colorize(std::cout);
|
||||
}
|
||||
|
||||
std::chrono::steady_clock::time_point begin = std::chrono::steady_clock::now();
|
||||
std::function<void(PkmnLib::Battling::ScriptResolver*)> initialize =
|
||||
|
|
Loading…
Reference in New Issue