diff options
Diffstat (limited to 'Completion/Debian/Type')
-rw-r--r-- | Completion/Debian/Type/_deb_architectures | 2 | ||||
-rw-r--r-- | Completion/Debian/Type/_deb_packages | 2 | ||||
-rw-r--r-- | Completion/Debian/Type/_debbugs_bugnumber | 11 |
3 files changed, 11 insertions, 4 deletions
diff --git a/Completion/Debian/Type/_deb_architectures b/Completion/Debian/Type/_deb_architectures index 22c43dd3e..1429112a8 100644 --- a/Completion/Debian/Type/_deb_architectures +++ b/Completion/Debian/Type/_deb_architectures @@ -1,6 +1,6 @@ #autoload -local extra +local extra expl zparseopts -E -D -a extra a: _description architectures expl 'architecture' diff --git a/Completion/Debian/Type/_deb_packages b/Completion/Debian/Type/_deb_packages index d82515cef..bdc0cb00c 100644 --- a/Completion/Debian/Type/_deb_packages +++ b/Completion/Debian/Type/_deb_packages @@ -122,7 +122,7 @@ _deb_packages () { typeset -gH $cachevar - _tags packages && compadd "$expl[@]" - "${(@P)cachevar}" + _tags packages && compadd "$expl[@]" -a - $cachevar } _debs_caching_policy () { diff --git a/Completion/Debian/Type/_debbugs_bugnumber b/Completion/Debian/Type/_debbugs_bugnumber index 2c10998ac..85e0c60d6 100644 --- a/Completion/Debian/Type/_debbugs_bugnumber +++ b/Completion/Debian/Type/_debbugs_bugnumber @@ -1,4 +1,11 @@ #autoload # TODO: use _describe with some basic metadata (e.g., bug title/package/version) -[[ $PREFIX$SUFFIX == [0-9]# ]] && -_wanted -x bugnum expl 'bug number' compadd ~/.devscripts_cache/bts/<->.(html|mbox)(N:t:r) + +local expl + +[[ $PREFIX$SUFFIX == [0-9]# ]] || return 1 + +# The cache directory moved; try both locations. +# ### TODO: Use 'bts listcachedbugs'? +local -a cachedirs=( ~/.devscripts_cache/bts ~/.cache/devscripts/bts ) +_wanted -x bugnum expl 'bug number' compadd -- $^cachedirs/<->.(html|mbox)(N:t:r) |