Fix incorrect detection of --key=value arguments

This commit is contained in:
Ethan P 2019-09-08 19:36:54 -07:00
parent 469a6fc65f
commit 8b5d2384b2
No known key found for this signature in database
GPG Key ID: 1F8DF8091CD46FBC

View File

@ -35,7 +35,7 @@ shiftopt() {
OPT="${_ARGV[$_ARGV_INDEX]}"
unset OPT_VAL
if [[ "$OPT" =~ ^--[a-zA-Z-]+=.* ]]; then
if [[ "$OPT" =~ ^--[a-zA-Z0-9_-]+=.* ]]; then
OPT_VAL="${OPT#*=}"
OPT="${OPT%%=*}"
fi