From 0efcb65ae11b0eedf9b84257c1f916d2750cc498 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Sun, 16 May 2021 23:52:31 +0900 Subject: [PATCH] mandb: fix an infinite loop by a leak variable --- lib/core-complete.sh | 141 ++++++++++++++++-------- memo/ChangeLog.md | 9 +- note.txt | 248 ++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 333 insertions(+), 65 deletions(-) diff --git a/lib/core-complete.sh b/lib/core-complete.sh index f223e3b9..73d3f9f5 100644 --- a/lib/core-complete.sh +++ b/lib/core-complete.sh @@ -2744,25 +2744,25 @@ function ble/complete/mandb/search-file { ble/string#split manpath : "$manpath" local path for path in "${manpath[@]}"; do - ble/complete/mandb/search-file/.check "$path/man1/$man.1" && return - ble/complete/mandb/search-file/.check "$path/man1/$man.8" && return + ble/complete/mandb/search-file/.check "$path/man1/$command.1" && return + ble/complete/mandb/search-file/.check "$path/man1/$command.8" && return if ble/is-function ble/bin/gzip; then - ble/complete/mandb/search-file/.check "$path/man1/$man.1.gz" && return - ble/complete/mandb/search-file/.check "$path/man1/$man.8.gz" && return + ble/complete/mandb/search-file/.check "$path/man1/$command.1.gz" && return + ble/complete/mandb/search-file/.check "$path/man1/$command.8.gz" && return fi if ble/is-function ble/bin/bzcat; then - ble/complete/mandb/search-file/.check "$path/man1/$man.1.bz" && return - ble/complete/mandb/search-file/.check "$path/man1/$man.1.bz2" && return - ble/complete/mandb/search-file/.check "$path/man1/$man.8.bz" && return - ble/complete/mandb/search-file/.check "$path/man1/$man.8.bz2" && return + ble/complete/mandb/search-file/.check "$path/man1/$command.1.bz" && return + ble/complete/mandb/search-file/.check "$path/man1/$command.1.bz2" && return + ble/complete/mandb/search-file/.check "$path/man1/$command.8.bz" && return + ble/complete/mandb/search-file/.check "$path/man1/$command.8.bz2" && return fi if ble/is-function ble/bin/xzcat; then - ble/complete/mandb/search-file/.check "$path/man1/$man.1.xz" && return - ble/complete/mandb/search-file/.check "$path/man1/$man.8.xz" && return + ble/complete/mandb/search-file/.check "$path/man1/$command.1.xz" && return + ble/complete/mandb/search-file/.check "$path/man1/$command.8.xz" && return fi if ble/is-function ble/bin/lzcat; then - ble/complete/mandb/search-file/.check "$path/man1/$man.1.lzma" && return - ble/complete/mandb/search-file/.check "$path/man1/$man.8.lzma" && return + ble/complete/mandb/search-file/.check "$path/man1/$command.1.lzma" && return + ble/complete/mandb/search-file/.check "$path/man1/$command.8.lzma" && return fi done return 1 @@ -2807,53 +2807,87 @@ function ble/complete/mandb/.generate-cache { if (type == "man") { print ".TH __ble_ignore__ 1 __ble_ignore__ __ble_ignore__"; print ".ll 9999" + topic_start = ".TP"; } + mode = "begin"; } function flush_topic(_, i) { if (g_keys_count == 0) return; for (i = 0; i < g_keys_count; i++) { + print ""; print "__ble_key__"; - if (type == "man") print ".TP"; + if (topic_start != "") print topic_start; print g_keys[i]; print ""; print "__ble_desc__"; print ""; print g_desc; - print ""; } g_keys_count = 0; g_desc = ""; } +#% # .Dd マクロ読み込み命令? +#% # .Nm (mdoc) 記述対象の名前 + mode == "begin" && /^\.(Dd|Nm)[[:space:]]/ { + if (type == "man" && /^\.Dd[[:space:]]+\$Mdoc/) topic_start = ""; + print $0; + } + + function register_key(key) { + g_keys[g_keys_count++] = key; + g_desc = ""; + } + + mode == "key1" { + register_key($0); + mode = "desc"; + next; + } + + mode == "keyc" { + g_current_key = g_current_key "\n" $0; + if (/^\.Xc/) { + register_key(g_current_key); + mode = "desc"; + } + next; + } + type == "man" && /^\.TP([^_[:alnum:]]|$)/ { if (g_keys_count && g_desc != "") flush_topic(); - mode = "key"; next; + mode = "key1"; + next; } - type == "mdoc" && /^\.It Fl([^_[:alnum:]]|$)/ { + +#% # mdoc でも man でもあった + /^\.It Fl([^_[:alnum:]]|$)/ { if (g_keys_count && g_desc != "") flush_topic(); - mode = "key"; sub(/^\.It Fl/, ".Fl"); + if ($0 ~ / Xo$/) { + g_current_key = $0; + mode = "keyc" + } else { + register_key($0); + mode = "desc"; + } + next; } + /^\.(S[Ss]|S[Hh]|P[Pp])([^_[:alnum:]]|$)/ { flush_topic(); next; } /^\.PD([^_[:alnum:]]|$)/ { next; } - mode == "key" { - g_keys[g_keys_count++] = $0; - g_desc = ""; - mode = "desc"; - next; - } mode == "desc" { if (g_desc != "") g_desc = g_desc "\n"; g_desc = g_desc $0; } END { flush_topic(); } - ' | ble/complete/mandb/convert-mandoc | ble/bin/awk ' + ' | ble/complete/mandb/convert-mandoc 2>/dev/null | ble/bin/awk ' function process_pair(name, desc) { if (!(g_name ~ /^-/)) return; - # FS (\034) は特殊文字として使用するので除外する。 +#% # FS (\034) は特殊文字として使用するので除外する。 sep = "\034"; if (g_name ~ /\034/) return; gsub(/\034/, "\x1b[7m^\\\x1b[27m", desc); @@ -2885,40 +2919,51 @@ function ble/complete/mandb/.generate-cache { g_desc = ""; } - sub(/^[[:space:]]*__ble_key__/, "", $0) { - flush_pair(); - mode = "key"; - } - sub(/^[[:space:]]*__ble_desc__/, "", $0) { - mode = "desc"; - } - - mode == "key" { - line = $0; + function process_key(line) { gsub(/\x1b\[[ -?]*[@-~]/, "", line); # CSI seq gsub(/\x1b[ -\/]*[0-~]/, "", line); # ESC seq gsub(/.\x08/, "", line); # CHAR BS gsub(/\x0E/, "", line); # SO gsub(/\x0F/, "", line); # SI - gsub(/[\x00-\x1F]/, "", line); # 制御文字は結局全削除 + gsub(/[\x00-\x1F]/, "", line); # Give up all the other control chars gsub(/^[[:space:]]*|[[:space:]]*$/, "", line); #gsub(/[[:space:]]+/, " ", line); - if (line == "") next; + if (line == "") return; if (g_name != "") g_name = g_name " "; g_name = g_name line; } - mode == "desc" { - line = $0; + function process_desc(line) { gsub(/^[[:space:]]*|[[:space:]]*$/, "", line); + gsub(/[[:space:]][[:space:]]+/, " ", line); if (line == "") { - if (g_desc != "") mode = ""; - next; + if (g_desc != "") return 0; + return 1; } if (g_desc != "") g_desc = g_desc " "; g_desc = g_desc line; + return 1; + } + + sub(/^[[:space:]]*__ble_key__/, "", $0) { + flush_pair(); + mode = "key"; + if (match($0, /__ble_desc__/) > 0) { + s_key = substr($0, 1, RSTART - 1); + s_desc = substr($0, RSTART + RLENGTH); + process_key(s_key); + mode = "desc"; + if (!process_desc(s_desc)) mode = ""; + next; + } + } + sub(/^[[:space:]]*__ble_desc__/, "", $0) { + mode = "desc"; } + mode == "key" { process_key($0); } + mode == "desc" { if (!process_desc($0)) mode = ""; } + END { flush_pair(); } ' | ble/bin/sort -k 1 } @@ -3007,7 +3052,7 @@ function ble/complete/source:argument/.generate-user-defined-completion { } function ble/complete/source:argument/.contains-literal-option { - local word + local word ret for word; do ble/syntax:bash/simple-word/is-simple "$word" && ble/syntax:bash/simple-word/eval "$word" noglob && @@ -3037,10 +3082,14 @@ function ble/complete/source:argument/.generate-from-mandb { while local ret; ! ble/complete/mandb/load-cache "$cmd"; do alias_checked=$alias_checked$cmd' ' ble/util/expand-alias "$cmd" - ble/string#split-words ret "$ret" - [[ $alias_checked != *" $ret "* ]] || return 1 - ble/complete/source:argument/.contains-literal-option "${ret[@]:1}" && return 1 - cmd=$ret + local words; ble/string#split-words ret "$ret"; words=("${ret[@]}") + + # 変数代入は読み飛ばし + local iword=0 rex='^[_a-zA-Z][_a-zA-Z0-9]*\+?=' + while [[ ${words[iword]} =~ $rex ]]; do ((iword++)); done + [[ ${words[iword]} && $alias_checked != *" ${words[iword]} "* ]] || return 1 + ble/complete/source:argument/.contains-literal-option "${words[@]:iword+1}" && return 1 + cmd=${words[iret]} done local entry diff --git a/memo/ChangeLog.md b/memo/ChangeLog.md index 2c7c90cd..aa4bc001 100644 --- a/memo/ChangeLog.md +++ b/memo/ChangeLog.md @@ -6,6 +6,10 @@ ## New features - complete/mandb: support mandb in FreeBSD `#D1432` 6c54f79 + - mandb: fix BS contamination used by nroff to represent bold (reported by rlnore) `#D1429` b5c875a + - mandb: fix an encoding prpblem of utf8 manuals `#D1446` 7a4a480 + - mandb: improve extraction and cache for each locale `#D1480` 3588158 + - mandb: fix an infinite loop by a leak variable (reported by rlanore, riblo) `#D1550` 0000000 - decode (`ble-decode-kbd`): support various specifications of key sequences `#D1439` 0f01cab - edit: support new options `bleopt edit_line_type={logical,graphical}` (motivated by 3ximus) `#D1442` 40ae242 - complete: support new options `bleopt complete_limit{,_auto}` (contributed by timjrd) `#D1445` b13f114 5504bbc @@ -72,13 +76,11 @@ - term: fix a bug that VTE based terminals are not recognized `#D1427` 7e16d9d - complete: fix a problem that candidates are not updated after menu-filter (reported by 3ximus) `#D1428` 98fbc1c -- complete/mandb: fix BS contamination used by nroff to represent bold (reported by rlnore) `#D1429` b5c875a - edit: work around the wrong job information of Bash in trap handlers (reported by 3ximus) `#D1435` `#D1436` bc4735e - edit (command-help): work around the Bash bug that tempenv vanishes with `builtin eval` `#D1438` 8379d4a - global: suppress missing locale errors (reported by 3ximus) `#D1440` 4d3c595 - edit (sword): fix definition of `sword` (shell words) `#D1441` f923388 - edit (`kill-forward-logical-line`): fix a bug not deleting newline at the end of the line `#D1443` 09cf7f1 -- complete (mandb): fix an encoding prpblem of utf8 manuals `#D1446` 7a4a480 - util (`ble/util/msleep`): fix hang in Cygwin by swithing from `/dev/udp/0.0.0.0/80` to `/dev/zero` `#D1452` d4d718a - util (`ble/util/msleep`): work around the bash-4.3 bug of `read -t` (reported by 3ximus) `#D1468` `#D1469` 4ca9b2e - syntax: fix broken AST with `[[` keyword `#D1454` 69658ef @@ -87,7 +89,6 @@ - global: fix declaration of associative arrays for `ble-reload` (reported by 0xC0ncord) `#D1471` 3cae6e4 - bind: work around broken `cmd_xmap` after switching the editing mode `#D1478` 8d354c1 - edit: clear graphic rendition on newlines and external commands `#D1479` 18bb2d5 -- mandb: improve extraction and cache for each locale `#D1480` 3588158 - decode (rlfunc): work around incomplete bytes in keyseq (reported by onelittlehope) `#D1483` 3559658 beb0383 37363be - main: fix a bug that unset `IFS` is not correctly restored `#D1489` 808f6f7 - edit: fix error messages on accessing undo records in emacs mode (reported by rux616) `#D1497` 61a57c0 e9be69e @@ -108,7 +109,7 @@ - complete: work around `fzf` completion settings loaded automatically `#D1508` 4fc51ae - complete: work around `bash-completion` bugs (reported by oc1024) `#D1533` 9d4ad56 - main: work around MSYS2 .inputrc (reported by n1kk) `#D1534` 9e786ae -- util (`modifyOtherKeys`): work around a quirk of Kitty (reported by NoahGorny) `#D1549` 0000000 +- util (`modifyOtherKeys`): work around a quirk of Kitty (reported by NoahGorny) `#D1549` f599525 ## Internal changes and fixes diff --git a/note.txt b/note.txt index b1449a88..70024ea0 100644 --- a/note.txt +++ b/note.txt @@ -1367,8 +1367,134 @@ bash_tips 0.5 ControlPanel/TUI Framework 0.4 progcolor +2021-05-17 + + * 履歴が消滅しすぎるので ble.sh の側で独立した履歴の仕組みを作りたい + + 然し何処に履歴ファイルを置くのかという問題がある。 + + a 今日日、~/.ble_history 的なファイルを置くのは憚られる。 + + b .cache には消えても良い物を置くべきだから置くなという話もあれば、 + + c .config はユーザー設定に纏わる物で dotfiles に入れている人もいるから勝手 + に書き込まないで欲しいという話もある。 + + d 結局、.local/share/blesh/xxxx に置く事になるのだろうか。まあ、 + .local/share/blesh/data 辺りに置いて置けば良いだろう。 + + * 色見本について探した + + 多くのサイトは微妙である。そもそも sRGB とかの概念があるのかないのか不明で + ある。単純に RGB #XXXXXX の値を線形で CMYK に変換していたりしてかなり怪しい。 + 色用語の場所にも sRGB やガンマ補正などの単語は見られない。 + + https://www.color-sample.com/popular/jiscolor/ja/ + + このサイトはちゃんと sRGB/Adobe RGB 等について載っているので少なくともちゃ + んとその辺りの事を認識した上で作られたサイトであろうと思われる。然し権利関 + 係の記述もないし、連絡先もない。メールボタンがあると思って押したら単に "友 + 達にこのサイトを紹介する" メールを送る為のボタンだった。© 2021 + Color-Sample.com. All Rights Reserved. という表記の右にあるアイコンがリン + クになっていたので押して見たが、単純にトップに跳ぶだけだった。Twitter アカ + ウントは https://twitter.com/color_sample で見に行ったら 2014 で更新が止まっ + ている。著作権が 2021 になっているのは機械的に置き換えているだけという事だ + ろうか。何だかよく分からない。というかよく見たらブラウザサポートというアイ + コンも古いブラウザが並んでいたりして更新が止まっている事を示唆している。 + + https://triple-underscore.github.io/css-color-ja.html#rgb-to-lab + + w3 の CSS の仕様の翻訳。ここにちゃんと色々の知識が書かれている。この文書は + 最初から最後まで読むべき。 + + http://mezala.la.coocan.jp/pc/jiscolor/jiscolor.html + + このページは複数の情報源からの差異について見せているがそもそも CMYK, RGB の + 変換式として異なるサイトから二種類持ってきていて (どちらかが間違っているの + に違いない) 更に、Wikipedia からの数値も比較していて、どれだけ見た目が変わっ + てくるかを見せているが。色には絶対的な基準はないのだとか色々言って納得して + いるが、これらは単に sRGB と RGB の解釈を間違えて変換しているから起こってい + る間違いのような気がする。(とはいいつつ画面の輝度やその他の要因もあるだろう + から一概には言えないのかもしれないが、少なくともどういう条件の元での変換を + 行っているのか明示した上で、その差異について議論していなければ情報としては + 使い物にならない) + + https://www.colordic.org/w + + このサイトは和色大辞典と言って 460 色掲載しているそうで一番大きい気がする。 + 然し、その RGB 値が sRGB なのかどうかとかも分からない。Q&A には再利用・再頒 + 布可能性などについては述べられていないし、各色の出典についても書かれていな + い。このサイトの RGB 値が実際に sRGB なのか何なのか確認して、その上で他の色 + についても変換を確認するのが良い気がする。 + +2021-05-16 + + * edit: BUG とても長いプロンプトにした時に列計算が壊れている。 + + また右端から入力を始めた時の折返しが正しくできていない。 + + * Linux パッケージのチェック (by killermoehre) [#Mxxxx] + どの Linux にどのパッケージのどの version が入っているかを調べられるサイト + https://pkgs.org/search/?q=groff + + * complete: tar xf groff-1.19.2.ta[TAB] でエラーが発生する + + と思ったらこれは bash-completion だった。 + 2021-05-15 + * AUR blesh-git について + + * requirements: ble-update の為に git, gawk があった方が良いのかもしれない? + 然し、最終的に AUR helper を呼び出すのであれば余り関係ないのかもしれない。 + + * https://aur.archlinux.org/cgit/aur.git/tree/blesh-update.sh?h=blesh-git#n29 + + (()) の中の quote のルールは変更されている。然し何故か PKGBUILD はそのま + ま何事もなく動作しているどういう事だろうか。shopt が調整されているのだろ + うか。或いは bash の version が違うのだろうか。適当な PKGBUILD を作ってそ + の辺りを出力させたらはっきりするのかもしれない。何れにしても将来的に変更 + されるかもしれないという事などを考えると修正した方が良い。 + + * local variables + local PRE_VERSION + local POST_VERSION + + 恐らく他の所で使うという訳ではないだろう。というか、この関数は PKGBUILD + で使われるのではなくて ble.sh から呼び出しているのであるから他の場所から + 使っているという事はない気がする。 + + * _package.sh は実の所 source するだけなので実行属性は必要ない。唯、source + path を経由して source したい時には実行属性がついている必要があるのだった + か? man bash を確認したがちゃんと実行可能である必要はないとの事が明記され + ている。 + + というか今知ったがカレントディレクトリよりも PATH の方が優先されるのだそ + うだ。だとすると結構変な事が起こるの可能性もあったのでは。今試しに ~/bin + に ble.sh を登録して、bash --norc から ble.sh ディレクトリの外で source + ble.sh を実行したらちゃんとロードされた。うーん。 + + * done: contributing に lib/_package.sh を追加する + + * test: 失敗する様になっている + + * quote-command の test に失敗している @ bash-4.3 直した + + * ^A 及び ^? に対する declare -p 補正が動かなくなっている @ bash-3.2 + + #D1522 に於いて bash-3.2 以下では配列表記で ^A が ^A^A^A^A になる事を発見 + したと思ったが、何故か今手許で試してみると ^A^A にしかなっていなくて以前 + のコードでも良かったという事になる。再現するための条件が何かあるのだろう + か。例えばスクリプト内部では declare -p の結果は ^A^A^A^A になるなど。 + + うーん。ble/util/assign を介すと確かに ^A^A^A^A になるがそれは scalar も + array も同様になっている。然し、#D1522 で対処した問題は配列の時にのみ起こっ + ていた問題の筈なのでこれは関係ない。 + + 関数内のみで起こる問題の可能性? と思ったがそれも変である。実際に ^A^A^A^A + にならず ^A^A になっているのは関数内で実行している時である。対話でも ^A^A + にしかならない。 + * README: 様々な機能へのリンクを貼った方が良いのではないかという事 2021-05-13 @@ -1386,29 +1512,63 @@ bash_tips * 空の keymap になっていたらキャッシュ無しで初期化し直す機能を付けた方が良いかもしれない。 - * ssh -option の後の補完が固まる - https://github.com/akinomyoga/ble.sh/issues/98 + うーん。何と再現しなくなってしまった様である。 + こうなるとコードを見て憶測で修正するしかなくなる。 + + # { + # ble/decode/keymap#load isearch dump + # ble/decode/keymap#load nsearch dump + # ble/decode/keymap#load vi_imap dump + # ble/decode/keymap#load vi_nmap dump + # ble/decode/keymap#load vi_omap dump + # ble/decode/keymap#load vi_xmap dump + # ble/decode/keymap#load vi_cmap dump + # } 3>| "$fname_keymap_cache" + + あー。もしかすると原因が分かったかもしれない。そもそも前に自分が問題を経験 + した時にもそうだったが、ble/decode/keymap#load を改名した事が原因なのであっ + た。此処で、ble.sh が部分的に更新されていたりすると問題になるという事なのだ + ろうという気がする。tmux-resurrect が一体何をしようとしているのかは結局謎な + のであるが、うーん。 + + そもそも報告者が最新の物でも再現するとかしないとか言っていた時に、毎回 make + をしていたのかというのも疑問の一つである。と思ったが rebuilding と言ってい + るので、其処の所はちゃんとやっているのだろうという気がする。 + + a あー。もしかすると複数の異なる ble.sh を使っていて cache が混合していると + いうのは十分考えられる可能性である。と思ったが本当にそれで問題が発生する + だろうか。何れにしても呼び出す vi.sh は同じディレクトリにいる ble.sh から + 呼び出される筈で中途半端に更新されていない限りは不整合は起こらない筈なの + である。 - $ alias ssh='TERM=xterm ssh' + 或いは tmux-resurrect が下手に関数等を保存しているのだとすると変な事が起 + こっても仕方ない → 試しに関数を定義して保存・復元して見たが関数は消滅し + ていた。つまり、そういう事は関係ない。 - で再現するとの情報を得た。他に man -w が現れたり消えたりするという情報も。 - つまり、一つの man -w が 100% になっているのではなくて man -w が繰り返しルー - プで呼び出されている? また、cache dir に大量のファイルができているという話 - も。つまり、ble/util/assign で無限ループを起こしている可能性がある。 + 或いは vi.sh の timestamp が偶然未来に設定されてしまったりする様な場合に + も問題が起こったりするかもしれない。 + うーん。やはり timestamp が壊れない限りはこれによって変な事が起こったりす + る可能性は低い気がする。 - $ complete -r - $ source ~/.fzf.bash - $ TERM=xterm ssh -w[TAB] + b 後タイムスタンプが nfs などによってずれていたりするとそういう事があったり + するかもしれない。timestamp が信用できない時にはどうしようもない。これは + 個々の使用者の側で注意して時刻を合わせてもらうしかない。 - TERM=xterm ssh -bash: 一致しません: /home/murase/.ssh/config.d/* + * done: 失敗したとしても端末の状態が壊れない様にする。 - * + ? コードを見てみると初期化に失敗した時には完全に空 map になってロードされな + いのではなくて safe keymap に fallback する筈なのだが何故そうなっていない + のだろうか。 + + これは再現できるので修正はそんなに難しいことはない筈。 + + * syntax 1>&$fd- は使えない 1>&./- もエラーになる - もっとちゃんと調べる必要がある + もっとちゃんと調べる必要がある。 2021-05-09 @@ -1441,6 +1601,8 @@ bash_tips * enhanced history ... 相対パスでファイル名を参照しているのを記録したい。そ れを auto-complete の実装に役立てたい。 + * TUI configuration? + 2021-05-06 * progcomp: complete -C completer で改行のエスケープに対応していない @@ -4427,13 +4589,69 @@ bash_tips Done (実装ログ) ------------------------------------------------------------------------------- +2021-05-17 + + * complete: ssh -option の後の補完が固まる (reported by rlanore, riblo) [#D1550] + https://github.com/akinomyoga/ble.sh/issues/98 + + $ alias ssh='TERM=xterm ssh' + + で再現するとの情報を得た。他に man -w が現れたり消えたりするという情報も。 + つまり、一つの man -w が 100% になっているのではなくて man -w が繰り返しルー + プで呼び出されている? また、cache dir に大量のファイルができているという話 + も。つまり、ble/util/assign で無限ループを起こしている可能性がある。 + + $ complete -r + $ source ~/.fzf.bash + $ TERM=xterm ssh -w[TAB] + + TERM=xterm ssh -bash: 一致しません: /home/murase/.ssh/config.d/* + + ble/complete/source:argument/.generate-from-mandb を見ると alias で展開され + る限りは無限ループする可能性のあるコードがある。但し、重複判定はしている筈 + なので alias が有限である限りは無限ループにはならない気がするが…。うーん。 + 分からない。或いは alias 展開で空文字列になった時に問題が生じる可能性? + + OK! 再現できた! + + - 自分の手元で再現できなかったのはどうも何か別の設定が勝手に + bash-completion を読み込んでしまうからだった様である。一体何の設定が勝手 + に読み取るのかは謎だが、complete -r を実行しても何故か設定が読み込まれて + しまう。と思ったが… ble.sh が __load_completion が存在している時には勝手 + にそれを呼び出す様にしていたのだった。そういう設計も考え物といえば考えも + のである。但し、これも unset -f __load_completion すれば解除する事ができ + る筈なのである。 + + * fixed: 分かった。 ble/complete/source:argument/.contains-literal-option が + variable leak して ret を書き換えしてしまっている。直した。 + + * done: 更に alias で TERM=... としていても対応できる様に読み飛ばし機能も追 + 加した。 + + x fixed: 然し ssh のオプションを抽出するのに失敗している。何故だろうか。改 + めて振る舞いについて調べる事にする。ble/util/assign を ble/assign と書い + ていた。修正した。 + + x fixed: 未だ駄目。と思ったら man を探索する部分で $command とするべき所が + $man になっている。 + + x fixed: それでも駄目。調べると ssh の man を gzcat する所まではできている。 + 其処から関係のありそうな物を抽出する所で失敗している。うーん。man から + mdoc に変化するという場合もある様だ。どちらでも良い様に色々書き換える。然 + し、それでも nroff の形式がよく分からないので行き当たりばったり的な実装に + なってしまう。取り敢えず Dd, Nm, Xo-Xc に対応した。また後段で __ble_key__ + と __ble_desc__ が同じ行になってしまった場合でも動く様に修正した。 + + x fixed: エラーが出る groff -[TAB] ... これは nawk に日本語のコメントを渡し + たのが行けなかった。日本語のコメントは除去する様にした。 + + x fixed: 空白が沢山表示される。連続する空白は1つに縮約する様にしたい。 + 2021-05-16 * work around Kitty bugs (reported by NoahGorny) [#D1549] https://github.com/akinomyoga/ble.sh/issues/110 - * とても長いプロンプトにすると列計算が壊れている。 - | bash-it に追加する事について考えると言っているがどの様な形で追加するのだろ | うか。コードを直接追加するのだろうか。その場合には色々と微妙。 |