mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
gron: Add options for enabling/disabling colored output
These match the options in the original gron: https://github.com/tomnomnom/gron
This commit is contained in:
parent
a3423f2af2
commit
d4f74d6c48
Notes:
sideshowbarker
2024-07-17 03:09:06 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/d4f74d6c48 Pull-request: https://github.com/SerenityOS/serenity/pull/16497 Reviewed-by: https://github.com/linusg
@ -38,6 +38,19 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
args_parser.set_general_help("Print each value in a JSON file with its fully expanded key.");
|
||||
|
||||
StringView path;
|
||||
args_parser.add_option(use_color, "Colorize output (default on tty)", "colorize", 'c');
|
||||
args_parser.add_option(Core::ArgsParser::Option {
|
||||
Core::ArgsParser::OptionArgumentMode::None,
|
||||
"Monochrome (don't colorize output)",
|
||||
"monochrome",
|
||||
'm',
|
||||
nullptr,
|
||||
[](char const* s) {
|
||||
VERIFY(s == nullptr);
|
||||
use_color = false;
|
||||
return true;
|
||||
},
|
||||
});
|
||||
args_parser.add_positional_argument(path, "Input", "input", Core::ArgsParser::Required::No);
|
||||
args_parser.parse(arguments);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user