diff --git a/ble.pp b/ble.pp index 74eab39f..2c4f7170 100644 --- a/ble.pp +++ b/ble.pp @@ -2634,6 +2634,10 @@ function ble/base/unload-for-reload { [[ $_ble_edit_detach_flag ]] || _ble_edit_detach_flag=reload fi + + # We here localize "_ble_bash" to avoid overwriting _ble_bash, which is + # already initialized by the new instance of ble.sh. + local _ble_bash=$_ble_bash ble/base/unload reload return 0 } diff --git a/docs/ChangeLog.md b/docs/ChangeLog.md index df51d9dd..779b77b5 100644 --- a/docs/ChangeLog.md +++ b/docs/ChangeLog.md @@ -12,7 +12,7 @@ - util(joblist): exclude more foreground dead jobs in Bash 5.3 `#D2174` 8a321424 - global: work around function names with slashes in Bash 5.3 POSIX mode `#D2221` 48c7bbee - main: update the startup message for debug versions of Bash `#D2222` afb29073 - - main: shorten the startup message for debug versions `#D2241` xxxxxxxx + - main: shorten the startup message for debug versions `#D2241` 0bc8610a - decode(read-user-settings): read the colonless form of `bind -x` of Bash 5.3 `#D2233` 62b23b69 - bgproc: support opts `kill9-timeout=TIMEOUT` `#D2034` 3ab41652 - progcomp(cd): change display name and support mandb desc (requested by EmilySeville7cfg) `#D2039` 74402098 @@ -117,7 +117,7 @@ - edit: fix standard streams in `EXIT` trap with `ble/widget/exit` `#D2217` 89f0dab8 - util(`ble/fd#cloexec`): check `fdflags` compatibility to avoid crash `#D2227` c3b3aaf8 - util(`ble/function#evaldef`): suppress alias expansions (reported by 103sbavert) `#D2240` 51e762fe - - main: fix a bug that `_ble_bash` is missing (reported by tessus) `#D2242` xxxxxxxx + - main: fix a bug that `_ble_bash` is missing (reported by tessus and Knusper) `#D2242` bb2dae6e xxxxxxxx ## Compatibility diff --git a/note.txt b/note.txt index 2e8da591..796b786c 100644 --- a/note.txt +++ b/note.txt @@ -7394,8 +7394,9 @@ bash_tips 2024-07-29 - * BUG main: _ble_bash が消失している (reported by tessus) [#D2242] + * BUG main: _ble_bash が消失している (reported by tessus and Knusper) [#D2242] https://github.com/akinomyoga/ble.sh/issues/470#issuecomment-2255357001 + https://github.com/akinomyoga/ble.sh/issues/472#issuecomment-2258653708 Ref. #D2240 これは #D2240 の regression. _ble_bash の位置を前方に移動した時に builtin @@ -7403,6 +7404,16 @@ bash_tips にも付加していた事によって全体で _ble_bash が unset される様になってしまっ ていた。これは問題だ。急いで修正する。 + 2024-07-31 最新版の中で ble-reload した時にエラーが起こるというがどういう事 + だろう。自分の手元で実行すると別にエラーは発生しない。然しその後で ble.sh + が全く機能しなくなる。やはり _ble_bash が消滅している様だ。未だ _ble_bash + を削除している箇所があると思ったが見つからない。 + + ble-reload の時に発生するという事を考えると ble/util/unload を呼び出してい + るのでそれによって _ble_bash が削除されている。今まで _ble_bash の初期化を + 遅延していた理由があった様な気がしていたが、それは reload 時の + ble/util/unload よりも後にしたかったからだろう。 + * main: --clear-cache で長々しい devel version では遅い warning を出力する必要はあるのか [#D2241] Ref. #D2222