diff options
-rw-r--r-- | shell/zsh/completion/_pkgcore | 8 | ||||
-rw-r--r-- | shell/zsh/pkgcore.zsh | 14 |
2 files changed, 11 insertions, 11 deletions
diff --git a/shell/zsh/completion/_pkgcore b/shell/zsh/completion/_pkgcore index 92c3a257..2fd77220 100644 --- a/shell/zsh/completion/_pkgcore +++ b/shell/zsh/completion/_pkgcore @@ -190,7 +190,7 @@ _pinspect() { '--sort-by-name[sort output by name, rather then by frequency]' '--first[show only the first N detail items]:number' '--last[show only the last N detail items]:number' - '*:repo:_repos -r sia' + '*:repo:_repos -t sia' ) case $line[1] in @@ -564,7 +564,7 @@ _pquery() { '--raw[disable configuration and filtering]' '--no-filters[disable all license filtering and visibility filtering]' "--virtuals[specific virtuals handling (everything is matched by default)]:options:((only\:'only match virtuals' disable\:'no matching virtuals'))" - {'(--repo)-r','(-r)--repo'}'[target repository]:repo:_repos -r sei' + {'(--repo)-r','(-r)--repo'}'[target repository]:repo:_repos -t sei' {'(--ebuild-repos)-E','(-E)--ebuild-repos'}'[search all ebuild repos]' {'(--binary-repos)-B','(-B)--binary-repos'}'[search all binary repos]' {'(--installed)-I','(-I)--installed'}'[search installed pkgs]' @@ -626,7 +626,7 @@ _pcd() { _arguments -C \ '(- :)'{-h,--help}'[show help information and exit]' \ '1:package atom' \ - '2:repo:_repos -r sib' \ + '2:repo:_repos -t sib' \ && ret=0 return ret @@ -639,7 +639,7 @@ _psite() { _arguments -C \ '(- :)'{-h,--help}'[show help information and exit]' \ '1:package atom' \ - '2:repo:_repos -r sib' \ + '2:repo:_repos -t sib' \ && ret=0 return ret diff --git a/shell/zsh/pkgcore.zsh b/shell/zsh/pkgcore.zsh index 45f9a8b9..560c6615 100644 --- a/shell/zsh/pkgcore.zsh +++ b/shell/zsh/pkgcore.zsh @@ -74,32 +74,32 @@ _array_index() { # are not considered). # # optional args: -# -r repo_types -- show specific repo types (defaults to showing source repos) +# -t repo_types -- show specific repo types (defaults to showing source repos) # The repo_types parameter can be any of the following characters in combination: # e: package.provided "repo" # i: vdb "repo" -# s: all source repos (default if the -r option isn't passed) +# s: all source repos (default if the -t option isn't passed) # b: all binary repos # a: repo-stack "repo" -# For example, `_repos -r sbi` will return the list of source, binary, and +# For example, `_repos -t sbi` will return the list of source, binary, and # installed repos. # -v section:key # -p print the output instead of using completion # -l use repo locations instead of repo_ids _repos() { typeset -A opts - zparseopts -E -A opts r: l p v: + zparseopts -E -A opts t: l p v: local repo_name output_type typeset -a repos repo_types output # verify selected repo types - if [[ -n ${opts[(I)-r]} ]]; then + if [[ -n ${opts[(I)-t]} ]]; then local -a accepted_repo_types=(e i s b a) - repo_types=(${(s::)opts[-r]}) + repo_types=(${(s::)opts[-t]}) for type in ${repo_types[@]}; do if [[ ! ${type} =~ [${accepted_repo_types[@]}] ]]; then - echo "_repos: invalid repo type argument to -r: ${type}" >&2 + echo "_repos: invalid repo type argument to -t: ${type}" >&2 echo "accepted types: ${accepted_repo_types[@]} (see docs)" >&2 return 1 fi |