Skip to content

Commit

Permalink
sabbrev (ble-sabbrev): fix delayed output before the initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed May 28, 2021
1 parent 5967d6c commit 5d85238
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/core-complete-def.sh
Expand Up @@ -13,6 +13,19 @@ ble/util/autoload "$_ble_base/lib/core-complete.sh" \
ble/widget/dabbrev-expand

function ble-sabbrev {
# check arguments for printing
local arg print=
for arg; do
if [[ $arg != -* && $arg != *=* ]]; then
print=1
break
fi
done
if (($#==0)) || [[ $print ]]; then
ble-import lib/core-complete && ble-sabbrev "$@"
return $?
fi

local ret; ble/string#quote-command "$FUNCNAME" "$@"
blehook/eval-after-load complete "$ret"
}
Expand Down
1 change: 1 addition & 0 deletions memo/ChangeLog.md
Expand Up @@ -119,6 +119,7 @@
- Makefile: create `run` directory instead of `tmp` `#D1557` 9bdb37d
- main: fix the workaround for `set -e` `#D1564` ab2f70b
- util: work around bash-3.0 bug `"${scal[@]/xxx}"` `#D1570` 0000000
- sabbrev (`ble-sabbrev`): fix delayed output before the initialization `#D1573` 0000000

## Compatibility

Expand Down
9 changes: 9 additions & 0 deletions note.txt
Expand Up @@ -4653,6 +4653,15 @@ bash_tips
Done (実装ログ)
-------------------------------------------------------------------------------

2021-05-28

* ble-sabbrev の初期化遅延で内容出力迄も遅延されている (bash-3.*) [#D1573]

ble-sabbrev の初期化を遅延しているが、内容確認の為の ble-sabbrev ですら遅延
されて、ロードした時になってから内容が出力される。この振る舞いは修正するべ
きである。然し、これを検出する為には、ble-sabbrev の一時実装の側で引数を解
析する必要がある。

2021-05-27

* canvas: 変数リークしている (buff, trap, {x,y}{1,2}) [#D1572]
Expand Down

0 comments on commit 5d85238

Please sign in to comment.