File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,12 @@ declare -A argExpected
1717argExpected=()
1818declare -a argChunks
1919argChunks=()
20+ declare -a parameters
21+ parameters=()
2022
2123lastWasArgument=0
2224lastArgument=" "
25+ endOfArguments=0
2326
2427# Expand chained short form arguments, eg -aih => -a -i -h
2528for argChunk in " $@ " ; do
@@ -161,6 +164,19 @@ argParse() {
161164 # Loop over all the argument chunks and determine if the argument type and value
162165 for argChunk in " ${argChunks[@]} " ; do
163166
167+ # Check if we've passed the last argument marker
168+ if [ $endOfArguments == 1 ]; then
169+ parameters+=(" $argChunk " )
170+ echo " #:$argChunk "
171+ continue
172+ fi
173+
174+ # Check if this chunk is the last argument marker
175+ if [ " $argChunk " == " --" ]; then
176+ endOfArguments=1
177+ continue ;
178+ fi
179+
164180 # Check if this chunk is a short form argument
165181 [[ $argChunk =~ $regexArgShort ]]
166182 if [ " ${BASH_REMATCH[1]} " != " " ]; then
You can’t perform that action at this time.
0 commit comments