Skip to content

Commit

Permalink
util (bleopt,bind): fix an error message and the error exit status
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Mar 7, 2022
1 parent df9f932 commit 29728b1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/decode.sh
Expand Up @@ -2779,6 +2779,7 @@ function ble/builtin/bind/.process {
# https://lists.gnu.org/archive/html/bug-bash/2019-02/msg00033.html
[[ $_ble_decode_bind_state != none ]] &&
(builtin bind --help)
flags=h$flags
fi
continue ;;
(--*)
Expand Down Expand Up @@ -2849,13 +2850,13 @@ function ble/builtin/bind {
shopt -u nocasematch &&
nocasematch=1

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

[[ $nocasematch ]] &&
shopt -s nocasematch
Expand Down

0 comments on commit 29728b1

Please sign in to comment.