echo: rename -col option to -color
This commit is contained in:
parent
7ce3212fb2
commit
8bfe2d62e5
|
@ -440,13 +440,13 @@ void define_command(const CommandParameters& params, Context& context)
|
||||||
|
|
||||||
void echo_message(const CommandParameters& params, Context& context)
|
void echo_message(const CommandParameters& params, Context& context)
|
||||||
{
|
{
|
||||||
ParametersParser parser(params, { { "col", true } },
|
ParametersParser parser(params, { { "color", true } },
|
||||||
ParametersParser::Flags::OptionsOnlyAtStart);
|
ParametersParser::Flags::OptionsOnlyAtStart);
|
||||||
String message;
|
String message;
|
||||||
for (auto& param : parser)
|
for (auto& param : parser)
|
||||||
message += param + " ";
|
message += param + " ";
|
||||||
ColorPair color = get_color(parser.has_option("col") ?
|
ColorPair color = get_color(parser.has_option("color") ?
|
||||||
parser.option_value("col") : "StatusLine");
|
parser.option_value("color") : "StatusLine");
|
||||||
context.print_status({ std::move(message), color } );
|
context.print_status({ std::move(message), color } );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user