mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-09-24 01:06:40 +00:00
feat: add command line option to disable color output
This commit is contained in:
@@ -34,6 +34,12 @@ const CommandLineOption* const OPTION_VERBOSE =
|
||||
.WithDescription("Outputs a lot more and more detailed messages.")
|
||||
.Build();
|
||||
|
||||
const CommandLineOption* const OPTION_NO_COLOR =
|
||||
CommandLineOption::Builder::Create()
|
||||
.WithLongName("no-color")
|
||||
.WithDescription("Disables colored terminal output.")
|
||||
.Build();
|
||||
|
||||
const CommandLineOption* const OPTION_MINIMAL_ZONE_FILE =
|
||||
CommandLineOption::Builder::Create()
|
||||
.WithShortName("min")
|
||||
@@ -125,6 +131,7 @@ const CommandLineOption* const COMMAND_LINE_OPTIONS[]{
|
||||
OPTION_HELP,
|
||||
OPTION_VERSION,
|
||||
OPTION_VERBOSE,
|
||||
OPTION_NO_COLOR,
|
||||
OPTION_MINIMAL_ZONE_FILE,
|
||||
OPTION_LOAD,
|
||||
OPTION_LIST,
|
||||
@@ -300,6 +307,9 @@ bool UnlinkerArgs::ParseArgs(const int argc, const char** argv, bool& shouldCont
|
||||
else
|
||||
con::globalLogLevel = con::LogLevel::INFO;
|
||||
|
||||
// --no-color
|
||||
con::globalUseColor = !m_argument_parser.IsOptionSpecified(OPTION_NO_COLOR);
|
||||
|
||||
// -min; --minimal-zone
|
||||
m_minimal_zone_def = m_argument_parser.IsOptionSpecified(OPTION_MINIMAL_ZONE_FILE);
|
||||
|
||||
|
Reference in New Issue
Block a user