2
0
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:
Jan Laupetin
2025-09-11 22:39:15 +02:00
parent d693ace12f
commit c28357a19f
5 changed files with 50 additions and 0 deletions

View File

@@ -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);