To allow the user to distinguish running instances of a script, it is
necessary to present the arguments that an instance was started with.
The most logical place to remember such information is inside the opt
module. Therefore, this commit adds the opt_get_argv() function, which
allows the caller to retrieve the arguments that were passed to the
opt_parse() function.
local opt
local i
+ declare -argx __opt_argv=("$@")
+
for (( i = 1; i <= $#; i++ )); do
local param
local long
echo "${__opt_value[$long]}"
return 0
}
+
+opt_get_argv() {
+ echo "${__opt_argv[@]}"
+ return 0
+}