[Bash-completion-devel] Bug#615134: Bug#615134: mutt: does not complete any aliases anymore

Ville Skyttä ville.skytta at iki.fi
Mon Jun 6 20:56:51 UTC 2011


On 06/06/2011 09:22 AM, Helmut Grohne wrote:

> Do you see which quotes I am referring to?

Yes - just to make sure, you removed the quotes from the mentioned line
in your .muttrc.  I can see how that makes things work.

But in one of your earlier comments (message 15) you mentioned "Not
quoting $file would solve this ...", to which I replied (message 20)
that I couldn't see why doing that would help (and still can't), then
you mentioned "I could simply remove the quotes" (message 25) at which
point it was no longer clear to me which exactly which quotes are being
discussed - around $file in the mutt completion or something in your muttrc.

If you have a patch to the mutt completion that makes lines like 'source
"~/somefile"' work in addition to 'source ~/somefile' (preferably
against current bash-completion git), I'd be interested in taking a
look.  As said earlier, I suppose we'll need an eval somewhere to make
that work; maybe something like this (100% untested):

diff --git a/completions/mutt b/completions/mutt
index c5d5d1f..372be3c 100644
--- a/completions/mutt
+++ b/completions/mutt
@@ -63,3 +63,3 @@ _muttconffiles()
         for file in "${newconffiles[@]}"; do
-            __expand_tilde_by_ref file
+            eval file="$file"
             [[ ! -f "$file" || "${sofar/ ${file} / }" != "$sofar" ]] &&






More information about the Bash-completion-devel mailing list