Skip to content

Commit

Permalink
edit: support bash-5.2 binding of "prior/next" to "history-search-{fo…
Browse files Browse the repository at this point in the history
…r,back}ward"
  • Loading branch information
akinomyoga committed Jun 19, 2022
1 parent 9c0e515 commit a3a353e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions keymap/emacs.sh
Expand Up @@ -8,6 +8,8 @@ function ble-edit/bind/load-keymap-definition:emacs { :; }
# 2019-01-18 keymap cache should be updated for recent changes
# 2019-04-01 keymap cache should be updated for adding __error__
# 2021-01-25 force update (change mapping of C-w and M-w)
# 2021-04-26 force update (rename ble/decode/keymap#.register)
# 2021-09-23 force update (change to nsearch and bind-history)

#------------------------------------------------------------------------------

Expand Down
2 changes: 2 additions & 0 deletions keymap/vi.sh
Expand Up @@ -7,6 +7,8 @@ function ble-edit/bind/load-keymap-definition:vi { :; }

# 2019-04-01 keymap cache should be updated for adding __error__
# 2021-01-25 force update (change mapping of C-w and M-w)
# 2021-04-26 force update (rename ble/decode/keymap#.register)
# 2021-09-23 force update (change to nsearch and bind-history)

source "$_ble_base/keymap/vi_digraph.sh"

Expand Down
4 changes: 4 additions & 0 deletions src/edit.sh
Expand Up @@ -6327,6 +6327,8 @@ function ble-decode/keymap:nsearch/define {
ble-bind -f C-n nsearch/forward
ble-bind -f up nsearch/backward
ble-bind -f down nsearch/forward
ble-bind -f prior nsearch/backward
ble-bind -f next nsearch/forward
}

#
Expand Down Expand Up @@ -6447,6 +6449,8 @@ function ble-decode/keymap:safe/bind-history {
ble-decode/keymap:safe/.bind 'up' '@nomarked backward-line history'
ble-decode/keymap:safe/.bind 'C-n' '@nomarked forward-line history'
ble-decode/keymap:safe/.bind 'down' '@nomarked forward-line history'
ble-decode/keymap:safe/.bind 'prior' 'history-search-backward' # bash-5.2
ble-decode/keymap:safe/.bind 'next' 'history-search-forward' # bash-5.2
ble-decode/keymap:safe/.bind 'C-x C-p' 'history-search-backward'
ble-decode/keymap:safe/.bind 'C-x up' 'history-search-backward'
ble-decode/keymap:safe/.bind 'C-x C-n' 'history-search-forward'
Expand Down

0 comments on commit a3a353e

Please sign in to comment.