Skip to content

Commit

Permalink
blehook: fix a problem that the shell hangs with failglob in pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Aug 12, 2019
1 parent fdb49f3 commit ac8ba6e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions ble.pp
Expand Up @@ -745,6 +745,7 @@ function ble/base/unload-for-reload {
return 0
}
function ble/base/unload {
[[ $$ == $BASHPID ]] || return
local IFS=$' \t\n'
ble/term/stty/TRAPEXIT
ble/term/leave
Expand Down
20 changes: 19 additions & 1 deletion memo.txt
Expand Up @@ -892,6 +892,15 @@ bash_tips

2019-08-05

* char_width_mode=emacs での斜め矢印の文字幅
この文字である ↗

ble.sh の上では幅2と計算されている。しかし、
emacs 上での取り扱いは幅1であり、そして contra でも1である。
自前の screen の cjkwidth emacs でも 1 であり、
それから自前の Poderosa の文字幅計算でも 1 である。
これは ble.sh の方を合わせるべきの気がする。

* vi: 起動した瞬間のカーソルの形状

2019-07-16
Expand Down Expand Up @@ -2220,7 +2229,7 @@ bash_tips
- edit: update prompt after execution of command through `ble-bind` `#D1151` 27208ea
- blehook: replace builtin `trap` `#D1152` d6c555e 7d4fd03
- blehook: suppress extra `DEBUG` trap calls `#D1155` 25c3e19
- syntax: allow `},fi,done,esac,then,...` after subshell `()` `#D1165`
- syntax: allow `},fi,done,esac,then,...` after subshell `()` `#D1165` fdb49f3

Fixes
- decode: workaround Poderosa that returns `DSR` instead of `CPR` in reply to `DSR(6)` `#D1018` 8e22c17
Expand Down Expand Up @@ -3223,6 +3232,15 @@ bash_tips
Done (実装ログ)
-------------------------------------------------------------------------------

2019-08-13

* exec: failglob したコマンドがサブシェルにあると固まって動かなくなる [#D1166]
例えば echo ? | echo で固まってしまう。
よく考えたらどう対処したら良いか分からない…。
→分かった…これは subshell で ble/base/unload が起こっているのが原因である。
ble/base/unload で BASHPID をチェックする様にしたらあっさりと直った。
他の hook に関してもチェックした方が良いのではないか。

2019-08-06

* syntax: 何とサブシェル () の直後に then 等を置いても OK らしい [#D1165]
Expand Down
1 change: 1 addition & 0 deletions src/history.sh
Expand Up @@ -602,6 +602,7 @@ fi
# Note: 複数行コマンドは eval -- $'' の形に変換して
# 書き込みたいので自前で処理する。
function ble/history:bash/TRAPEXIT {
[[ $$ == $BASHPID ]] || return
if shopt -q histappend &>/dev/null; then
ble/builtin/history -a
else
Expand Down

0 comments on commit ac8ba6e

Please sign in to comment.