Skip to content

Commit

Permalink
global: quote numbers for unexpected IFS
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Jul 9, 2022
1 parent 64d471a commit 0179afc
Show file tree
Hide file tree
Showing 21 changed files with 417 additions and 391 deletions.
2 changes: 1 addition & 1 deletion archive/layer/adapter.sh
Expand Up @@ -46,7 +46,7 @@ function ble/highlight/layer:adapter/update {
# update char buffer
ble/highlight/layer/update/shift _ble_highlight_layer_adapter_buff
local i g gprev=0 ctx=0 ret
((i1>0)) && { ble/highlight/layer/getg $((i1-1)); gprev=$g; }
((i1>0)) && { ble/highlight/layer/getg "$((i1-1))"; gprev=$g; }
# ble/edit/info/show text "layer:adapter u = $i1-$i2"
for ((i=i1;i<=i2;i++)); do
local ch
Expand Down
8 changes: 4 additions & 4 deletions ble.pp
Expand Up @@ -347,7 +347,7 @@ function ble/base/xtrace/.log {
builtin printf '%s [%(%F %T %Z)T] %s %s\n' "$open" -1 "$1" "$close"
else
builtin printf '%s [%s] %s %s\n' "$open" "$(date 2>/dev/null)" "$1" "$close"
fi >&${BASH_XTRACEFD:-2}
fi >&"${BASH_XTRACEFD:-2}"
}
function ble/base/xtrace/adjust {
local level=${#_ble_bash_xtrace[@]} IFS=$' \t\n'
Expand Down Expand Up @@ -650,7 +650,7 @@ function ble/init/restore-IFS {
rex=$rex'('
break
else
ble/base/adjust-BASH_REMATCH/increase $((end-i))
ble/base/adjust-BASH_REMATCH/increase "$((end-i))"
rex=$rex')'
builtin unset -v 'rparens[--count]'
fi
Expand All @@ -670,12 +670,12 @@ function ble/init/restore-IFS {

while ((count>=1)); do
local end=${rparens[count-1]}
ble/base/adjust-BASH_REMATCH/increase $((end-i))
ble/base/adjust-BASH_REMATCH/increase "$((end-i))"
rex=$rex')'
builtin unset -v 'rparens[--count]'
done

ble/base/adjust-BASH_REMATCH/increase $((${#text}-i))
ble/base/adjust-BASH_REMATCH/increase "$((${#text}-i))"

_ble_bash_BASH_REMATCH=("${BASH_REMATCH[@]}")
_ble_bash_BASH_REMATCH_rex=$rex
Expand Down
2 changes: 1 addition & 1 deletion contrib
Submodule contrib updated 1 files
+2 −2 prompt-elapsed.bash
1 change: 1 addition & 0 deletions docs/ChangeLog.md
Expand Up @@ -397,6 +397,7 @@
- test: clean up check failures by `make check` and `make scan` `#D1812` bb3e0a3
- util (`fd#alloc`): limit the search range of free fds `#D1813` 43be0e4 4c90072
- github/workflows: define an action for the nightly builds (contributed by uyha) `#D1814` a3082a0
- global: quote numbers for unexpected `IFS` `#D1835` XXXXXXX

## Contrib

Expand Down

0 comments on commit 0179afc

Please sign in to comment.