Skip to content

Commit

Permalink
util(ble/util/eval-pathname-expansion): fix restoring shopt options i…
Browse files Browse the repository at this point in the history
…n bash-4.0
  • Loading branch information
akinomyoga committed Jul 9, 2022
1 parent 82c9934 commit d3b3f7b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/util.sh
Expand Up @@ -1553,7 +1553,16 @@ function ble/util/eval-pathname-expansion {
local canon=
if [[ :$2: == *:canonical:* ]]; then
canon=1
local set=$- shopt=$BASHOPTS gignore=$GLOBIGNORE
local set=$- shopt gignore=$GLOBIGNORE
if ((_ble_bash>=40100)); then
shopt=$BASHOPTS
else
shopt=
shopt -q failglob && shopt=$shopt:failglob
shopt -q nullglob && shopt=$shopt:nullglob
shopt -q extglob && shopt=$shopt:extglob
shopt -q dotglob && shopt=$shopt:dotglob
fi
shopt -u failglob
shopt -s nullglob
shopt -s extglob
Expand Down

0 comments on commit d3b3f7b

Please sign in to comment.