mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-28 01:00:28 +03:00
add 'name' command to set current client name
This commit is contained in:
parent
4a3f9d6187
commit
cf39835805
@ -775,6 +775,14 @@ void define_color_alias(const CommandParameters& params, Context& context)
|
||||
parser[0], parser[1], parser.has_option("allow-override"));
|
||||
}
|
||||
|
||||
void set_client_name(const CommandParameters& params, Context& context)
|
||||
{
|
||||
ParametersParser parser(params, {});
|
||||
if (parser.positional_count() != 1)
|
||||
throw wrong_argument_count();
|
||||
ClientManager::instance().set_client_name(context, params[0]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void register_commands()
|
||||
@ -889,6 +897,7 @@ void register_commands()
|
||||
}));
|
||||
|
||||
cm.register_commands({"ca", "colalias"}, define_color_alias);
|
||||
cm.register_commands({"name"}, set_client_name);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user