From b83b428c5cc48043cb625844b87e94acbc194ba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Tue, 7 Nov 2023 07:22:01 +0100 Subject: core: add incremental search in commands history (issue #2040) Changes: - move key ctrl+r to ctrl+s - add key ctrl+r to search in commands history - add option `search_history` in command `/input` - add key context "histsearch" - add option weechat.look.buffer_search_history - add buffer variables "text_search_direction", "text_search_history" and "text_search_ptr_history" --- doc/en/weechat_user.en.adoc | 58 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 51 insertions(+), 7 deletions(-) (limited to 'doc/en/weechat_user.en.adoc') diff --git a/doc/en/weechat_user.en.adoc b/doc/en/weechat_user.en.adoc index 41dc69b73..a6f4a506c 100644 --- a/doc/en/weechat_user.en.adoc +++ b/doc/en/weechat_user.en.adoc @@ -914,11 +914,30 @@ Bar _input_ has following default items: | Item | Example | Description | input_prompt | `[@Flashy(i)]` | Input prompt, for irc: nick and modes (mode "+i" means invisible on libera). | away | `(away)` | Away indicator. -| input_search | `[Search (~ str,msg)]` | Search indicator ("`~`": case insensitive, "`==`": case sensitive, "`str`": search string, "`regex`": search regular expression, "`msg`": search in messages, "`pre`": search in prefixes, "`pre\|msg`": search in prefixes and messages). +| input_search | `[Search lines (~ str,msg)]` | Search indicator (see below) | input_paste | `[Paste 7 lines ? [ctrl-y] Yes [ctrl-n] No]` | Question to user for pasting lines. | input_text | `hi peter!` | Input text. |=== +There are two search modes: + +* search in lines, for example `[Search lines (~ str,msg)]`, with the following info: +** `~`: case insensitive +** `==`: case sensitive +** `str`: search string +** `regex`: search regular expression +** `msg`: search in messages +** `pre`: search in prefixes +** `pre\|msg`: search in prefixes and messages. +* search in commands history, for example `[Search command (~ str,local)]`, + with the following info: +** `~`: case insensitive +** `==`: case sensitive +** `str`: search string +** `regex`: search regular expression +** `local`: search in buffer local history +** `global`: search in global history. + Bar _nicklist_ has following default items: [width="100%",cols="^3,^3,9",options="header"] @@ -1613,7 +1632,8 @@ They can be changed and new ones can be added with the <>). | `+/input search_text_here+` +| kbd:[Ctrl+r] | Search for text in commands history (see <>). | `+/input search_history+` +| kbd:[Ctrl+s] | Search for text in buffer lines (see <>). | `+/input search_text_here+` | kbd:[Ctrl+s], kbd:[Ctrl+u] | Set unread marker on all buffers. | `+/allbuf /buffer set unread+` | kbd:[Ctrl+x] | Switch current buffer if buffers are merged with same number, for example switch to another IRC server buffer. | `+/buffer switch+` | kbd:[Alt+x] | Zoom on merged buffer (kbd:[Alt+x] again: display all merged buffers). | `+/buffer zoom+` @@ -1716,23 +1736,47 @@ They can be changed and new ones can be added with the <