Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] _debbugs_bugnumber: Track bts's data dir migration.
- X-seq: zsh-workers 38990
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] _debbugs_bugnumber: Track bts's data dir migration.
- Date: Thu, 4 Aug 2016 15:53:17 +0000
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
---
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)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author