New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add incremental search in commands history #2040
Comments
flashcode
changed the title
Incremental search in commands history
Add incremental search in commands history
Nov 6, 2023
flashcode
added a commit
that referenced
this issue
Nov 7, 2023
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"
flashcode
added a commit
that referenced
this issue
Nov 7, 2023
flashcode
added a commit
that referenced
this issue
Nov 7, 2023
flashcode
added a commit
that referenced
this issue
Nov 11, 2023
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"
flashcode
added a commit
that referenced
this issue
Nov 11, 2023
flashcode
added a commit
that referenced
this issue
Nov 11, 2023
flashcode
added a commit
that referenced
this issue
Nov 11, 2023
flashcode
added a commit
that referenced
this issue
Nov 11, 2023
flashcode
added a commit
that referenced
this issue
Nov 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature description
Add a way to perform an incremental search in commands history, like Ctrl+R in Bash.
This is similar to the script https://github.com/weechat/scripts/blob/master/python/histsearch.py.
Proposed changes (comments are welcome if you have other ideas):
search_history
in command/input
, bind default key Ctrl+R on this commandreturn
: stop search here (unchanged)ctrl-q
: stop search and reset scroll to its initial value (unchanged)meta-c
: switch case sensitive/insensitive (unchanged)ctrl-x
(instead ofctrl-r
): toggle between string and regex searchctrl-r
orup
: search in previous (older) buffer linesctrl-s
ordown
: search in next (newer) buffer linesreturn
: stop search and use matching inputctrl-q
: stop search and restore input to its initial valuemeta-c
: switch case sensitive/insensitivectrl-x
: toggle between string and regex searchctrl-r
orup
: search in previous (older) history entriesctrl-s
ordown
: search in next (newer) history entriesctrl-o
: execute the command found and put the next one (newer) in input without executing itctrl-o
: execute the selected command in history (by using keysup
/down
orctrl-up
/ctrl-down
and put the next one (newer) in input without executing itweechat.look.buffer_search_history
: enum with valueslocal
(default) orglobal
: default search in history: in buffer local history or global historytext_search
, new possible values are:0
: search disabled1
: search in buffer lines (Ctrl+S)2
: search in commands history (Ctrl+R)text_search_direction
: enum, possible values are:0
: search backward1
: search forwardtext_search_history
: enum, possible valued are:0
: none (search not enabled)1
: search in local history2
: search in global historytext_search_ptr_history
: pointer to history foundThe text was updated successfully, but these errors were encountered: