aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2016-02-25 23:29:49 -0500
committerTim Harder <radhermit@gmail.com>2016-02-25 23:31:00 -0500
commiteb518d116de8d1c2a588d09c4714047a9568b263 (patch)
treede6d404f70fe609f095b0f0b1cb377878cb00981
parentshell/zsh: use -t instead of -r for _repo() type args (diff)
downloadpkgcore-eb518d116de8d1c2a588d09c4714047a9568b263.tar.gz
pkgcore-eb518d116de8d1c2a588d09c4714047a9568b263.tar.bz2
pkgcore-eb518d116de8d1c2a588d09c4714047a9568b263.zip
shell/zsh: _repo() type error message tweak
-rw-r--r--shell/zsh/pkgcore.zsh8
1 files changed, 4 insertions, 4 deletions
diff --git a/shell/zsh/pkgcore.zsh b/shell/zsh/pkgcore.zsh
index 560c6615..73ec1efe 100644
--- a/shell/zsh/pkgcore.zsh
+++ b/shell/zsh/pkgcore.zsh
@@ -95,12 +95,12 @@ _repos() {
# verify selected repo types
if [[ -n ${opts[(I)-t]} ]]; then
- local -a accepted_repo_types=(e i s b a)
+ local -a supported_repo_types=(e i s b a)
repo_types=(${(s::)opts[-t]})
for type in ${repo_types[@]}; do
- if [[ ! ${type} =~ [${accepted_repo_types[@]}] ]]; then
- echo "_repos: invalid repo type argument to -t: ${type}" >&2
- echo "accepted types: ${accepted_repo_types[@]} (see docs)" >&2
+ if [[ ! ${type} =~ [${supported_repo_types[@]}] ]]; then
+ echo "${funcstack[1]}: invalid repo type: ${type}" >&2
+ echo "supported types: ${supported_repo_types[@]} (see docs)" >&2
return 1
fi
done