summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cmd.sh12
-rw-r--r--src/getopt.sh6
2 files changed, 9 insertions, 9 deletions
diff --git a/src/cmd.sh b/src/cmd.sh
index 0742fb4..1e94f90 100644
--- a/src/cmd.sh
+++ b/src/cmd.sh
@@ -19,8 +19,8 @@
# <http://www.gnu.org/licenses/>.
_cmds=' '
-_cmd_running=
-_cmd_running_clean=
+cmd_running=
+cmd_running_clean=
register_cmd()
{
@@ -114,12 +114,12 @@ run_cmd()
cmd_clean="$(printf '%s' "${cmd}" | \
tr '[A-Z]' '[a-z]' | tr -C '[a-z0-9_]' '_')"
if is_cmd "${cmd}"; then
- _cmd_running="${cmd}"
- _cmd_running_clean="${cmd_clean}"
+ cmd_running="${cmd}"
+ cmd_running_clean="${cmd_clean}"
es=0
"cmd_${cmd_clean}_main" "${@}" || es=${?}
- _cmd_running=''
- _cmd_running_clean=''
+ cmd_running=''
+ cmd_running_clean=''
else
error "$(get_msg 'cmd_not_found')" "${cmd}"
return 1
diff --git a/src/getopt.sh b/src/getopt.sh
index 0e63ead..12f3807 100644
--- a/src/getopt.sh
+++ b/src/getopt.sh
@@ -24,12 +24,12 @@ get_options()
local prefix=
local opt=
- if [ "x${running_cmd_clean}" = 'x' ]; then
+ if [ "x${cmd_running_clean}" = 'x' ]; then
optstring="${OPTSTRING}"
prefix='opt_'
else
- eval "optstring=\"\${cmd_${running_cmd_clean}_optstring}\""
- prefix="cmd_${running_cmd_clean}_opt_"
+ eval "optstring=\"\${cmd_${cmd_running_clean}_optstring}\""
+ prefix="cmd_${cmd_running_clean}_opt_"
fi
unset OPTARG