From c90dafcbfb05ed481f8f6b433043137e15ca04c0 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Thu, 18 Feb 2016 14:57:23 +0200 Subject: [PATCH] Document the `|` register, as well as default registers saved by exec/eval --- README.asciidoc | 6 +++++- doc/manpages/execeval.asciidoc | 6 +++++- doc/manpages/registers.asciidoc | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.asciidoc b/README.asciidoc index 48f88cae..cb776844 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -965,6 +965,7 @@ Most commands using a register default to a specific one if not specified: * `/`: default search register, used by regex based commands like `s`, `*` or `/` * `@`: default macro register, used by `q` and `Q` * `^`: default mark register, used by `z` and `Z` + * `|`: default shell command register, used by command that spawn a subshell such as `|`, ``, `!` or `` Macros ~~~~~~ @@ -995,6 +996,9 @@ the `:exec` and `:eval` commands can be used for running Kakoune commands. paremeters as if they were entered in the command prompt. By default, they do their execution in the context of the current client. +These two commands also save the following registers, who are then restored +when the commands have been executed: `/`, `"`, `|`, `^`, `@`. + Some parameters provide a way to change the context of execution: * `-client `: execute in the context of the client named @@ -1013,7 +1017,7 @@ Some parameters provide a way to change the context of execution: * `-no-hooks`: disable hook execution while executing the keys/commands * `-with-maps`: use user key mapping in `:exec` instead of built in keys. * `-save-regs `: regs is a string of registers to be restored after - execution. + execution (overwrites the list of registers saved by default) The execution stops when the last key/command is reached, or an error is raised. diff --git a/doc/manpages/execeval.asciidoc b/doc/manpages/execeval.asciidoc index 033d2898..c1ff0f90 100644 --- a/doc/manpages/execeval.asciidoc +++ b/doc/manpages/execeval.asciidoc @@ -20,6 +20,9 @@ paremeters as if they were entered in the command prompt. By default, their execution happens within the context of the current client, and stops when the last key/command is reached, or an error is raised. +These two commands also save the following registers, who are then restored +when the commands have been executed: */*, *"*, *|*, *^*, *@*. + Optional flags -------------- *-client* :: @@ -51,4 +54,5 @@ Optional flags use user key mapping in instead of built in keys (*exec* only) *-save-regs* :: - regs is a string of registers to be restored after execution + regs is a string of registers to be restored after execution (overwrites + the list of registers saved by default, c.f. description) diff --git a/doc/manpages/registers.asciidoc b/doc/manpages/registers.asciidoc index 807eb53f..5afb7cd7 100644 --- a/doc/manpages/registers.asciidoc +++ b/doc/manpages/registers.asciidoc @@ -29,7 +29,7 @@ Most commands using a register default to a specific one if not specified: and *R* */*:: - default search register, used by regex based commands like *s*, *\** + default search register, used by regex based commands like *s*, *** or */* *@*:: @@ -38,6 +38,10 @@ Most commands using a register default to a specific one if not specified: *^*:: default mark register, used by *z* and *Z* +*|*:: + default shell command register, used by command that spawn a subshell such as + *|*, **, *!* or ** + Special registers ----------------- Some registers are not general purposes, they cannot be written to, but they