From dd6f79759fee9128bd99eff939655c34a1eb2813 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Thu, 4 Aug 2016 15:53:17 +0000 Subject: [PATCH] 38990: _debbugs_bugnumber: Track bts's data dir migration. --- ChangeLog | 5 +++++ Completion/Debian/Type/_debbugs_bugnumber | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3a1fee1fc..71d4052fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-08-05 Daniel Shahaf + + * 38990: Completion/Debian/Type/_debbugs_bugnumber: Track bts's + data dir migration. + 2016-08-04 Jun-ichi Takimoto * unposted: Doc/Zsh/zle.yo: fix format 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)