Skip to content

Commit

Permalink
decode (bind): work around "shopt -s nocasematch"
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Aug 25, 2020
1 parent fef40eb commit b34ad58
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/decode.sh
Expand Up @@ -2805,13 +2805,23 @@ function ble/builtin/bind/.process {
return 0
}
function ble/builtin/bind {
local nocasematch=
((_ble_bash>=30100)) &&
shopt -q nocasematch &&
shopt -u nocasematch &&
nocasematch=1

local flags=
ble/builtin/bind/.process "$@"
if [[ $_ble_decode_bind_state == none ]]; then
builtin bind "$@"
else
[[ $flags != *e* ]]
fi
fi; local ext=$?

[[ $nocasematch ]] &&
shopt -s nocasematch
return "$ext"
}
function bind { ble/builtin/bind "$@"; }

Expand Down

0 comments on commit b34ad58

Please sign in to comment.