diff --git a/doc/pages/commands.asciidoc b/doc/pages/commands.asciidoc index 58cf4e0e..9a86b86d 100644 --- a/doc/pages/commands.asciidoc +++ b/doc/pages/commands.asciidoc @@ -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*::: diff --git a/src/commands.cc b/src/commands.cc index ea90030e..e81528d6 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -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 or .. (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" } }, diff --git a/src/main.cc b/src/main.cc index a0485815..a83ebe74 100644 --- a/src/main.cc +++ b/src/main.cc @@ -51,7 +51,8 @@ static const char* startup_info = " * rotate main selection moved to ), rotate content to , ( for backward\n" " * faces are now scoped, set-face command takes an additional scope parameter\n" " * key is gone, use 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 {