mirror of
https://github.com/eth-p/bat-extras.git
synced 2025-06-20 19:57:46 +02:00
Fix incorrect detection of --key=value arguments
This commit is contained in:
parent
469a6fc65f
commit
8b5d2384b2
@ -35,7 +35,7 @@ shiftopt() {
|
|||||||
OPT="${_ARGV[$_ARGV_INDEX]}"
|
OPT="${_ARGV[$_ARGV_INDEX]}"
|
||||||
unset OPT_VAL
|
unset OPT_VAL
|
||||||
|
|
||||||
if [[ "$OPT" =~ ^--[a-zA-Z-]+=.* ]]; then
|
if [[ "$OPT" =~ ^--[a-zA-Z0-9_-]+=.* ]]; then
|
||||||
OPT_VAL="${OPT#*=}"
|
OPT_VAL="${OPT#*=}"
|
||||||
OPT="${OPT%%=*}"
|
OPT="${OPT%%=*}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user