Skip to content

Commit

Permalink
edit: support rlvar "search-ignore-case" of bash-5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Feb 27, 2023
1 parent fe339c3 commit e3ad110
Show file tree
Hide file tree
Showing 5 changed files with 167 additions and 53 deletions.
1 change: 1 addition & 0 deletions docs/ChangeLog.md
Expand Up @@ -127,6 +127,7 @@
- syntax: highlight `\?` in here documents `#D1959` e619e73
- syntax: recognize history expansion in here documents, `"...!"` (bash <= 4.2), and `$!` (bash <= 4.1) `#D1959` e619e73
- syntax: support context after `((...))` and `[[ ... ]]` in bash-5.2 `#D1962` 67cb967
- edit: support the readline variable `search-ignore-case` of bash-5.3 `#D1976` xxxxxxx

## Changes

Expand Down
2 changes: 1 addition & 1 deletion keymap/vi.sh
Expand Up @@ -5196,7 +5196,7 @@ function ble/keymap:vi/search/clear-matched {
_ble_keymap_vi_search_matched=
[[ $_ble_edit_mark_active == vi_search ]] && _ble_edit_mark_active=
}
## @fn ble/keymap:vi/search/invoke-search needle opts
## @fn ble/keymap:vi/search/invoke-search needle
##
## @param[in] needle
## 検索パターンを表す正規表現を指定する。
Expand Down
21 changes: 21 additions & 0 deletions note.txt
Expand Up @@ -6588,6 +6588,27 @@ bash_tips
Done (実装ログ)
-------------------------------------------------------------------------------

2023-02-21

* 5.3: case insensitive history search (bash 72c4a0f4) [#D1976]

rlvar search-ignore-case を on にすると readline での検索機能が ignore-case
になる機能が bash devel に実装されている。

実装してみた。

x fixed: 動いていない→ nocasematch を使うべきなのに nocaseglob を使ってい
る場所があった。修正した。

x fixed: 一文字目は大文字小文字が違っても一致しても、続けて文字を入力して行
くとより前の物を探しに行ってしまう。これは文字追加の時の検査で失敗してい
るという事だろうか → 確認したら単に ignore-case を渡すのを忘れていた。直
した。動いている。

x nsearch で一致範囲を着色する機能があるが、大文字小文字が違って見つかった
項目については一致範囲の着色ができていない。カーソル位置も末端になってし
まっている。

2023-02-20

* cygwin: sudo すると PS1 の \u が bash に化けてしまう。何故? [#D1975]
Expand Down

0 comments on commit e3ad110

Please sign in to comment.