summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2021-07-07 19:18:27 +1000
committerMaxime Coste <mawww@kakoune.org>2021-07-07 19:18:27 +1000
commit394a1044054bbed4fda7d70b79da224cf08fe5c8 (patch)
treedbd1eaa4ca79abb44b62285b2ea3204a98cd4b03
parent0c92ec8a237c339e7be657e7af7f3f401e1ad8b4 (diff)
parente9584994000f5a7845220a7fe7d183b018c160b4 (diff)
Merge remote-tracking branch 'Screwtapello/doc-improvements'
-rw-r--r--doc/pages/commands.asciidoc23
1 files changed, 13 insertions, 10 deletions
diff --git a/doc/pages/commands.asciidoc b/doc/pages/commands.asciidoc
index 940b109f..84ba0493 100644
--- a/doc/pages/commands.asciidoc
+++ b/doc/pages/commands.asciidoc
@@ -485,15 +485,16 @@ New commands can be defined using the *define-command* command:
*-shell-script-completion*:::
following string is a shell command which takes parameters as
positional params and outputs one completion candidate per line.
- The provided shell command will run after each keypress
-
- during the execution of the shell command, the following env vars are
+ The provided shell command will run after each keypress.
+ During the execution of the shell command, the following env vars are
available:
- - *kak_token_to_complete*::::
+ *$kak_token_to_complete*::::
Index of the token being completed in the command line.
+ Note that unlike the Unix `argv` tradition,
+ 0 is the first argument, not the command name itself.
- - *kak_pos_in_token*::::
+ *$kak_pos_in_token*::::
Position of the cursor inside the token being completed, in bytes
from token start.
@@ -501,14 +502,16 @@ New commands can be defined using the *define-command* command:
following string is a shell command which takes parameters as
positional params and outputs one completion candidate per line.
The provided shell command will run once at the beginning of each
- completion session, candidates are cached and then used by Kakoune
- internal fuzzy engine
+ completion session, candidates are cached and then used by kakoune
+ internal fuzzy engine.
- during the execution of the shell command, the following env vars are
+ During the execution of the shell command, the following env vars are
available:
- - *kak_token_to_complete*::::
- Index of the token being completed in the command line.
+ *$kak_token_to_complete*::::
+ Index of the token being completed in the command line.
+ Note that unlike the Unix `argv` tradition,
+ 0 is the first argument, not the command name itself.
Using shell expansion allows defining complex commands or accessing
Kakoune's state: