From e85538e670a94c61f6d5d49935f504b68410f3bc Mon Sep 17 00:00:00 2001 From: Tim Allen Date: Sun, 10 Jan 2021 23:16:12 +1100 Subject: [PATCH 1/2] doc: Sort define-command's switches to match its docstring. --- doc/pages/commands.asciidoc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/pages/commands.asciidoc b/doc/pages/commands.asciidoc index fda6d223..f21eba1f 100644 --- a/doc/pages/commands.asciidoc +++ b/doc/pages/commands.asciidoc @@ -441,6 +441,15 @@ New commands can be defined using the *define-command* command: the command accepts a *num* parameter, which can be either a number, or of the form .., with both and omittable + *-override*::: + allow the new command to replace an existing one with the same name + + *-hidden*::: + do not show the command in command name completions + + *-docstring*::: + define the documentation string for the command + *-file-completion*::: try file completion on any parameter passed to this command @@ -484,15 +493,6 @@ New commands can be defined using the *define-command* command: - *kak_token_to_complete*:::: Index of the token being completed in the command line. - *-override*::: - allow the new command to replace an existing one with the same name - - *-hidden*::: - do not show the command in command name completions - - *-docstring*::: - define the documentation string for the command - Using shell expansion allows defining complex commands or accessing Kakoune's state: From a5e9b69e616e4485b43cfd1cf57528a864b8e060 Mon Sep 17 00:00:00 2001 From: Tim Allen Date: Sun, 10 Jan 2021 23:24:32 +1100 Subject: [PATCH 2/2] doc: Document the -menu switch for define-command. This switch was added in c972dfd2. --- doc/pages/commands.asciidoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/pages/commands.asciidoc b/doc/pages/commands.asciidoc index f21eba1f..53e84c98 100644 --- a/doc/pages/commands.asciidoc +++ b/doc/pages/commands.asciidoc @@ -450,6 +450,10 @@ New commands can be defined using the *define-command* command: *-docstring*::: define the documentation string for the command + *-menu*::: + the suggestions generated by the completion options are the only + permitted parameters. + *-file-completion*::: try file completion on any parameter passed to this command