about summary refs log tree commit diff
path: root/Completion/Debian
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2016-08-04 15:53:17 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2016-08-05 12:37:25 +0000
commitdd6f79759fee9128bd99eff939655c34a1eb2813 (patch)
tree1fe4c0c944070ea5ab625f36860aebff2accd0a2 /Completion/Debian
parent7f052ed3e44176240d53a379674cf22fcb38807a (diff)
downloadzsh-dd6f79759fee9128bd99eff939655c34a1eb2813.tar.gz
zsh-dd6f79759fee9128bd99eff939655c34a1eb2813.tar.xz
zsh-dd6f79759fee9128bd99eff939655c34a1eb2813.zip
38990: _debbugs_bugnumber: Track bts's data dir migration.
Diffstat (limited to 'Completion/Debian')
-rw-r--r--Completion/Debian/Type/_debbugs_bugnumber9
1 files changed, 7 insertions, 2 deletions
diff --git a/Completion/Debian/Type/_debbugs_bugnumber b/Completion/Debian/Type/_debbugs_bugnumber
index 2c10998ac..f7b09054d 100644
--- a/Completion/Debian/Type/_debbugs_bugnumber
+++ b/Completion/Debian/Type/_debbugs_bugnumber
@@ -1,4 +1,9 @@
 #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)
+
+[[ $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)