From adaec05969c688553bfcd643116a7bfde4516781 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Tue, 14 Feb 2023 19:37:52 +0900 Subject: [PATCH] histdb: support "bleopt histdb_remarks" --- contrib | 2 +- docs/ChangeLog.md | 2 ++ lib/vim-airline.sh | 3 +-- note.txt | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 3 deletions(-) diff --git a/contrib b/contrib index b7457cda..b365f5dd 160000 --- a/contrib +++ b/contrib @@ -1 +1 @@ -Subproject commit b7457cda161893937f578d2bd0eb1979986c4ce6 +Subproject commit b365f5dd75121b4259d5080d03a2d868f45305d3 diff --git a/docs/ChangeLog.md b/docs/ChangeLog.md index 70c408f9..161abcf1 100644 --- a/docs/ChangeLog.md +++ b/docs/ChangeLog.md @@ -561,6 +561,8 @@ - histdb: fix remaining debug function name "assign{2 => }" in bash <= 3.2 `#D1953` xxxxxxx - histdb: fix a problem that the background process fails to start in bash-3.0 `#D1956` xxxxxxx - histdb: fix a bug that history search fails with a single quote in the commandline `#D1957` xxxxxxx + - histdb: fix `histdb-word` completions in the middle of the commandline `#D1968` xxxxxxx + - histdb: support `bleopt histdb_remarks` `#D1968` xxxxxxx - integration: move `fzf` and `bash-preexec` integrations to subdir `#D1939` 86d9467 diff --git a/lib/vim-airline.sh b/lib/vim-airline.sh index 0f1df972..aec02f5e 100644 --- a/lib/vim-airline.sh +++ b/lib/vim-airline.sh @@ -247,8 +247,7 @@ function ble/prompt/backslash:lib/vim-airline/mode { function ble/prompt/backslash:lib/vim-airline/gitstatus { local "${_ble_contrib_prompt_git_vars[@]/%/=}" # WA #D1570 checked if ble/contrib/prompt-git/initialize; then - local hash branch - ble/contrib/prompt-git/get-head-information + ble/contrib/prompt-git/update-head-information if [[ $branch ]]; then ble/prompt/print "$bleopt_vim_airline_symbol_branch$branch" elif [[ $hash ]]; then diff --git a/note.txt b/note.txt index 7595e5bb..e0128cf3 100644 --- a/note.txt +++ b/note.txt @@ -1374,6 +1374,10 @@ bash_tips bug-bash, third-party bugs & reviews ------------------------------------------------------------------------------- +2023-02-14 + + * bug-bash: bash-5.2 で -u extquote しても ${var//[$'\n']} が改行を削除する。 + 2023-02-06 * bug-bash: 実は colored-stats は本来 LS_COLORS を反映するらしい。然し、 @@ -1932,6 +1936,12 @@ bash_tips - leakvars - keymap の移動 (これは別 commit にする?) +2023-02-14 + + * no-argument return がまたある。make scan でチェックするべき。 + + $ grc 'return[[:space:]]*($|[;|&])' + 2023-02-12 * syntax: 5.0 以降では関数名として function `xxx` 等も実は許されている。5.3 @@ -6647,6 +6657,46 @@ bash_tips 2023-02-14 + * histdb: git info 等追加情報を user の指定で記録できる様にする [#D1969] + → "bleopt histdb_remarks" として実装した。 + + 2023-02-18 そもそも rps1 での dirty 更新が発生していない。因みに + prompt_status_line に関しては dirty 更新は働いている様だ。然し、これは独立 + した問題の気がする。 + + うーん。mintty の中だけでなく、普通に新しいセッションでは全て動いていない。 + 何故? うーん。histdb_remarks の対応 commit で以降で動かなくなっている。→同 + 期処理等を破壊したかと思ったが単に dirty_mark の生成コードでバグを埋め込ん + でいただけだった。 + + * histdb: PS1=(\$ ' で ( を挿入した時にエラーメッセージ [#D1968] + + これは master 81e376a (もう存在していない。対応するのは 8d5cab8 が近い) で + は発生していない。 + + これは最初は syntax のバグかと思ったがどうやら histdb-word で発生している。 + + うーん。response で現在のコマンド内容と全く関係ない物が生成されている? とい + うかそもそも空の文字列で候補生成されているのではないか。然し、そうだとして + も index が 8 になっているのはよく分からない。 + + _ble_edit_str='PS1=(\$ '\''' len=9 + _ble_edit_ind="5" + ret="8:'.timeout 1001'" # response + + うーん。分かった request の時点で全ての単語に対して補完を試みようとしている。 + 何故かというと現在のカーソル位置がコマンドラインの末端にあるという事を仮定 + している。 + + カーソルが行の途中にある場合には個別に実装する必要があるのではないか。と思っ + たが、カーソルが単語の途中にある時にはその単語について補間する必要はない。 + 飽くまで単語の末尾にいる時にだけ補完を実行すれば良い。行の途中にいてかつ単 + 語の末尾にいるという状況では、まだ閉じていない単語の末尾にいるという事はあ + りえない。という事は、現在位置にある単語について調べれば十分である。 + + うーん。現在の単語の開始位置を調べる方法が非自明だったが (wbegin を stat に + 設置せずに一気に読み取ってしまう単語が存在する) 取り敢えず実装した。 + * blerc.template: update unicode versions [#D1967] 2023-02-13