From c335712e4e53d1b3fa6b6dd69629ff0d11e07518 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Fri, 29 Jul 2022 21:04:23 +0200 Subject: [PATCH] doc registers: document prompt history registers So far they have only been talked about in source code (HistoryRegister), not in documentation. Let's give them an official name so users can find them better; "prompt history register" seems better than "history register" since the former gives more context. OTOH, in future other registers (like @) could grow into history registers, so I'm not sure. State that the history registers are only changed by _interactive_ prompts; that's not quite true yet for user modes but I'll push a separate fix for that. --- doc/pages/changelog.asciidoc | 2 +- doc/pages/registers.asciidoc | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/pages/changelog.asciidoc b/doc/pages/changelog.asciidoc index 8cd81a80..d475f278 100644 --- a/doc/pages/changelog.asciidoc +++ b/doc/pages/changelog.asciidoc @@ -15,7 +15,7 @@ released versions. * User mappings is now bound to `` while keeping/removing main selection moved to `,` and `` -* History registers `%reg{colon}`, `%reg{slash}` and `%reg{pipe}` now +* Prompt history registers `%reg{colon}`, `%reg{slash}` and `%reg{pipe}` now have reverse chronological order == Kakoune 2021.11.07 diff --git a/doc/pages/registers.asciidoc b/doc/pages/registers.asciidoc index 28aed054..65f6baf4 100644 --- a/doc/pages/registers.asciidoc +++ b/doc/pages/registers.asciidoc @@ -34,7 +34,9 @@ All normal-mode commands using a register default to a specific one if not speci default search / regex register, used by: */*, **, *?*, **, *n*, **, *N*, **, ***, **, *s*, *S*, ** and ** - (see <>) + (see <>). + This is a prompt history register, holding the last 100 commands entered + at an interactive regex prompt. *@* (arobase):: default macro register, used by: @@ -50,7 +52,10 @@ All normal-mode commands using a register default to a specific one if not speci *|* (pipe):: default shell command register, used by commands that spawn a subshell: *|*, **, *!* and ** - (see <>) + (see <>). + This is a prompt history register, holding the last 100 commands entered + at interactive shell command prompts, except for commands starting with + a space. == Special registers @@ -70,7 +75,8 @@ contain some special data null register, always empty *:* (colon):: - last entered command + prompt history register holding the last 100 commands entered at the + interactive prompt, except for commands starting with a space. == Integer registers