Skip to content

Commit

Permalink
syntax: fix uninitialized syntax-highlighting in bash-3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Jul 28, 2022
1 parent d785f5d commit 6aa12c8
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions ble-syntax-lazy.sh
Expand Up @@ -51,6 +51,19 @@ ble-autoload "$_ble_base/lib/core-syntax.sh" \
ble-syntax:bash/simple-word/eval \
ble-syntax:bash/simple-word/is-simple

#------------------------------------------------------------------------------
# グローバル変数の定義 (関数内からではできないのでここで先に定義)

if ((_ble_bash>=40200||_ble_bash>=40000&&!_ble_bash_loaded_in_function)); then
builtin unset -v _ble_syntax_highlight_filetype
if ((_ble_bash>=40200)); then
declare -gA _ble_syntax_highlight_filetype
_ble_syntax_highlight_filetype=()
else
declare -A _ble_syntax_highlight_filetype=()
fi
fi

#------------------------------------------------------------------------------
# 遅延読み込みの設定

Expand All @@ -65,16 +78,3 @@ if ble/util/isfunction ble/util/idle.push; then
else
ble-syntax/import
fi

#------------------------------------------------------------------------------
# グローバル変数の定義 (関数内からではできないのでここで先に定義)

if ((_ble_bash>=40200||_ble_bash>=40000&&!_ble_bash_loaded_in_function)); then
builtin unset -v _ble_syntax_highlight_filetype
if ((_ble_bash>=40200)); then
declare -gA _ble_syntax_highlight_filetype
_ble_syntax_highlight_filetype=()
else
declare -A _ble_syntax_highlight_filetype=()
fi
fi

0 comments on commit 6aa12c8

Please sign in to comment.