Skip to content

Commit

Permalink
syntax: suppress brace expansions in compound assignments in Bash 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Apr 3, 2023
1 parent 9e0c187 commit 1f0d8e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/core-syntax.sh
Expand Up @@ -2240,6 +2240,9 @@ function ble/syntax:bash/check-brace-expansion {
inactive=1
elif ((ctx==CTX_CONDI||ctx==CTX_CONDQ||ctx==CTX_RDRS||ctx==CTX_VRHS)); then
inactive=1
elif ((_ble_bash>=50300&&ctx==CTX_VALR)); then
# bash-5.3 以降では arr=([9]={1..10}) 等のブレース展開は不活性
inactive=1
elif ((ctx==CTX_PATN||ctx==CTX_BRAX)); then
local ntype; ble/syntax/parse/nest-type -v ntype
if [[ $ntype == glob_attr=* ]]; then
Expand Down

0 comments on commit 1f0d8e1

Please sign in to comment.