Skip to content

Commit 1702a98

Browse files
committed
Fixed bug with partial argument matching
1 parent 0bfefaa commit 1702a98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

argument-parser.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ argExpected['v|verbose']="verbose - verbosity level"
5252
argGetName() {
5353
for k in "${!argExpected[@]}"
5454
do
55-
regexArg="($1)\|"
55+
regexArg="\|($1)\|"
5656
[[ "$k|" =~ $regexArg ]]
5757
if [ "${BASH_REMATCH[1]}" != "" ]; then
5858

0 commit comments

Comments
 (0)