Skip to content

Commit f639f4e

Browse files
committed
Added an argValue function for retrieving the value an argument has
1 parent c73644c commit f639f4e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

argument-parser.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,9 @@ argExists() {
103103
return 0
104104
fi
105105
}
106+
107+
argValue() {
108+
if argExists "$1"; then
109+
echo "${args["$1"]}"
110+
fi
111+
}

0 commit comments

Comments
 (0)