Package: apt-xapian-index
Version: 0.45
Severity: important
Tags: patch

As noticed by Gábor in [1], the axi-cache completion overwrites
COMP_WORDBREAKS unnecessarily, breaking other completion scripts that
would work otherwise.  For example, from his tests:

| $ git show master:q<TAB>
| $ git show master:quote.<TAB>
| master:quote.c   master:quote.h   
|
| $ axi-cache <TAB>
| again     depends   help      madison   more      policy    rdepends
| search    show      showpkg   showsrc   
|
| $ git show master:q<TAB>
| $ git show quote.<TAB>
| quote.c  quote.h  quote.o
|
| Not good.

Luckily the axi-cache completion already uses "_get_comp_words_by_ref
-n :", so the presence of colon in COMP_WORDBREAKS shouldn't have any
effect anyway.  How about this patch?

-- >8 --
Subject: Do not clobber COMP_WORDBREAKS in bash completion script

Other completion scripts might be relying on the presence of ':'
in the list of word-breaking characters.  This script already uses
_get_comp_words_by_ref to paste words back together when they were
split at ':', so there is no need to touch COMP_WORDBREAKS.

Reported-by: SZEDER Gábor <[email protected]>
---
Hope that helps,
Jonathan

[1] http://thread.gmane.org/gmane.comp.version-control.git/227267

 axi-cache.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/axi-cache.sh b/axi-cache.sh
index 37cbd703..18ddf6f2 100644
--- a/axi-cache.sh
+++ b/axi-cache.sh
@@ -11,7 +11,6 @@ have axi-cache &&
 _axi_cache() {
     local cur prev cmd
     COMPREPLY=()
-    COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
 
     type _get_comp_words_by_ref &>/dev/null && {
         _get_comp_words_by_ref -n: cur prev
-- 
1.8.3


--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to