summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-04-27 17:30:13 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-04-27 17:30:13 (EDT)
commitf86181fdab181e28696c0e0899a840badfe2d77d (patch)
treeee5a074ee6dc12b0d4e8d2991474c7d22f639371 /src
parent55882b95650e030b357618a70651fa85e8d5ffe4 (diff)
Shift consistently
Diffstat (limited to 'src')
-rw-r--r--src/cmd.sh4
-rw-r--r--src/control.sh2
-rw-r--r--src/main.sh2
-rw-r--r--src/vardata.sh1
4 files changed, 6 insertions, 3 deletions
diff --git a/src/cmd.sh b/src/cmd.sh
index c357e4f..b95a302 100644
--- a/src/cmd.sh
+++ b/src/cmd.sh
@@ -85,6 +85,7 @@ print_cmd_summaries()
print_cmd_usage()
{
local cmd="${1}"
+ shift 1
local cmd_clean=
local usage=
@@ -98,6 +99,7 @@ print_cmd_usage()
is_cmd()
{
local cmd="${1}"
+ shift 1
case "${cmds}" in *" ${cmd} "*) return 0;; *) return 1;; esac
}
@@ -105,9 +107,9 @@ is_cmd()
run_cmd()
{
local cmd="${1}"
+ shift 1
local cmd_clean=
local es=
- shift
cmd_clean="$(printf '%s' "${cmd}" | \
tr '[A-Z]' '[a-z]' | tr -C '[a-z0-9_]' '_')"
diff --git a/src/control.sh b/src/control.sh
index a2e2810..489d55b 100644
--- a/src/control.sh
+++ b/src/control.sh
@@ -23,7 +23,7 @@ _parse_control_error()
local file="${1}"
local line_nr="${2}"
local msg_id="${3}"
- shift 1
+ shift 3
local file_info=
if [ ${line_nr} -eq 0 ]; then
diff --git a/src/main.sh b/src/main.sh
index 61255b8..bc807cc 100644
--- a/src/main.sh
+++ b/src/main.sh
@@ -76,7 +76,7 @@ main()
return 1
else
cmd="${1}"
- shift
+ shift 1
fi
srand $((${$} + $(time)))
diff --git a/src/vardata.sh b/src/vardata.sh
index 4f6ec8d..6c19077 100644
--- a/src/vardata.sh
+++ b/src/vardata.sh
@@ -72,6 +72,7 @@ fini_vardata()
get_vardata_dir()
{
local dir="${1}"
+ shift 1
case " ${VARDATA_DIRS} " in
*" ${dir} "*)