Skip to content

Commit c07467d

Browse files
committed
Simplified regex
1 parent edb6d10 commit c07467d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

argument-parser.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ argList() {
9090
done
9191
done <<< "$arguments"
9292

93-
regexArgName="(.+) - (.+)"
93+
regexArgName=".+ - (.+)"
9494
[[ "${argExpected[$arguments]}" =~ $regexArgName ]]
9595

9696
local argumentList="${argumentsPrefixed[@]}"
97-
local argumentDesc="${BASH_REMATCH[2]}"
97+
local argumentDesc="${BASH_REMATCH[1]}"
9898
echo "$argumentList $argumentDesc" | column -ts $'\t'
9999
done
100100
}

0 commit comments

Comments
 (0)