diff options
-rw-r--r-- | lib/getopt.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/getopt.sh b/lib/getopt.sh index 32fb57d..048e02b 100644 --- a/lib/getopt.sh +++ b/lib/getopt.sh @@ -27,12 +27,12 @@ get_options() local prefix= local opt= - if [ "x${running_cmd}" = 'x' ]; then + if [ "x${running_cmd_clean}" = 'x' ]; then optstring="${OPTSTRING}" prefix='opt_' else - eval "optstring=\"\${cmd_${running_cmd}_optstring}\"" - prefix="cmd_${running_cmd}_opt_" + eval "optstring=\"\${cmd_${running_cmd_clean}_optstring}\"" + prefix="cmd_${running_cmd_clean}_opt_" fi unset OPTARG |