The data that is stored in opt's __opt_long array is a subset of
the data stored in __opt_map. The operations that the module does
on __opt_long might just as well be performed on __opt_map without
affecting the behavior of the module.
This commit removes the __opt_long array from the module and
changes the affected functions to use __opt_map instead.
)
declare -Axg __opt_short
- declare -Axg __opt_long
declare -Axg __opt_desc
declare -Axg __opt_flags
declare -Axg __opt_value
fi
__opt_short["$long"]="$short"
- __opt_long["$short"]="$long"
__opt_flags["$long"]="$parsed_flags"
__opt_desc["$long"]="$desc"
__opt_regex["$long"]="$regex"
local long
local desc
- long="${__opt_long[$short]}"
+ long="${__opt_map[-$short]}"
desc="${__opt_desc[$long]}"
printf "\t-%s\t--%s\t%s\n" \