summaryrefslogtreecommitdiff
path: root/asp.in
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2017-03-12 15:24:58 -0400
committerDave Reisner <dreisner@archlinux.org>2017-03-12 15:24:58 -0400
commit382337e9970c3e522461deadb99a88e9ac307215 (patch)
tree0037055867c9056794ecc89f0b8ef3adc75dab89 /asp.in
parent682132448e1d73608506f3c5c4d52fc422a207b1 (diff)
downloadasp32-382337e9970c3e522461deadb99a88e9ac307215.tar.xz
fix argc value in __require_argc
I'm too stubborn to turn extdebug on, so let's just give up on BASH_ARGC (which never worked properly because former stubbornness about extdebug), and just pass $#.
Diffstat (limited to 'asp.in')
-rw-r--r--asp.in32
1 files changed, 16 insertions, 16 deletions
diff --git a/asp.in b/asp.in
index 15b2387..d22f81e 100644
--- a/asp.in
+++ b/asp.in
@@ -44,7 +44,7 @@ EOF
}
__require_argc() {
- local min max argc=$(( BASH_ARGC - 1 ))
+ local min max argc=$2
case $1 in
*-*)
@@ -197,72 +197,72 @@ disk_usage() {
}
action__checkout() {
- __require_argc 1-
+ __require_argc 1- $#
map package_checkout "$@"
}
action__difflog() {
- __require_argc 1
+ __require_argc 1 $#
difflog "$1"
}
action__disk-usage() {
- __require_argc 0
+ __require_argc 0 $#
disk_usage
}
action__export() {
- __require_argc 1-
+ __require_argc 1- $#
map package_export "$@"
}
action__gc() {
- __require_argc 0
+ __require_argc 0 $#
gc
}
action__help() {
- __require_argc 0
+ __require_argc 0 $#
usage
}
action__list-all() {
- __require_argc 0
+ __require_argc 0 $#
list_all
}
action__list-arches() {
- __require_argc 1-
+ __require_argc 1- $#
map package_get_arches "$@"
}
action__list-local() {
- __require_argc 0
+ __require_argc 0 $#
list_local
}
action__list-repos() {
- __require_argc 1-
+ __require_argc 1- $#
map package_get_repos "$@"
}
action__log() {
- __require_argc 1
+ __require_argc 1 $#
log "$1"
}
action__shortlog() {
- __require_argc 1
+ __require_argc 1 $#
shortlog "$1"
}
action__show() {
- __require_argc 1-2
+ __require_argc 1-2 $#
package_show_file "$@"
}
action__untrack() {
- __require_argc 1-
+ __require_argc 1- $#
map untrack "$@"
}
@@ -271,7 +271,7 @@ action__update() {
}
action__ls-files() {
- __require_argc 1
+ __require_argc 1 $#
package_list_files "$1"
}