zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] _debbugs_bugnumber: Track bts's data dir migration.
@ 2016-08-04 15:53 Daniel Shahaf
  0 siblings, 0 replies; only message in thread
From: Daniel Shahaf @ 2016-08-04 15:53 UTC (permalink / raw)
  To: zsh-workers

---
 Completion/Debian/Type/_debbugs_bugnumber | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Completion/Debian/Type/_debbugs_bugnumber b/Completion/Debian/Type/_debbugs_bugnumber
index 2c10998..f7b0905 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)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-04 15:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-04 15:53 [PATCH] _debbugs_bugnumber: Track bts's data dir migration Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).