Skip to content

Commit

Permalink
Merge pull request #3 from billyzkid/billyzkid-patch-1
Browse files Browse the repository at this point in the history
Redeclare OPTARG instead of clear
  • Loading branch information
billyzkid authored Aug 28, 2023
2 parents c4cffc7 + 866feaf commit 553a0fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/getopts_long.bash
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ getopts_long() {
fi
fi
elif [[ "${optspec_long}" =~ (^|[[:space:]])${!optvar}([[:space:]]|$) ]]; then
OPTARG=
unset OPTARG
declare -g OPTARG
else
# Invalid option
if [[ "${optspec_short:0:1}" == ':' ]]; then
Expand Down

0 comments on commit 553a0fd

Please sign in to comment.