parent
592ab71048
commit
14d12fac04
|
@ -304,7 +304,7 @@ New commands can be defined using the *define-command* command:
|
|||
- *kak_token_to_complete*::::
|
||||
Index of the token being completed in the command line.
|
||||
|
||||
*-allow-override*:::
|
||||
*-override*:::
|
||||
allow the new command to replace an existing one with the same name
|
||||
|
||||
*-hidden*:::
|
||||
|
|
|
@ -860,7 +860,7 @@ void define_command(const ParametersParser& parser, Context& context, const Shel
|
|||
if (not all_of(cmd_name, is_identifier))
|
||||
throw runtime_error(format("invalid command name: '{}'", cmd_name));
|
||||
|
||||
if (cm.command_defined(cmd_name) and not parser.get_switch("allow-override"))
|
||||
if (cm.command_defined(cmd_name) and not parser.get_switch("override"))
|
||||
throw runtime_error(format("command '{}' already defined", cmd_name));
|
||||
|
||||
CommandFlags flags = CommandFlags::None;
|
||||
|
@ -1033,7 +1033,7 @@ const CommandDesc define_command_cmd = {
|
|||
ParameterDesc{
|
||||
{ { "params", { true, "take parameters, accessible to each shell escape as $0..$N\n"
|
||||
"parameter should take the form <count> or <min>..<max> (both omittable)" } },
|
||||
{ "allow-override", { false, "allow overriding an existing command" } },
|
||||
{ "override", { false, "allow overriding an existing command" } },
|
||||
{ "hidden", { false, "do not display the command in completion candidates" } },
|
||||
{ "docstring", { true, "define the documentation string for command" } },
|
||||
{ "file-completion", { false, "complete parameters using filename completion" } },
|
||||
|
|
|
@ -51,7 +51,8 @@ static const char* startup_info =
|
|||
" * rotate main selection moved to ), rotate content to <a-)>, ( for backward\n"
|
||||
" * faces are now scoped, set-face command takes an additional scope parameter\n"
|
||||
" * <backtab> key is gone, use <s-tab> instead\n"
|
||||
" === Kakoune v2018.04.13 Released ===\n";
|
||||
" === Kakoune v2018.04.13 Released ===\n"
|
||||
" * define-command -allow-override switch has been renamed -override\n";
|
||||
|
||||
struct startup_error : runtime_error
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user