[Bash-completion-devel] Bug#615134: Bug#615134: mutt: does not complete any aliases anymore
Helmut Grohne
helmut at subdivi.de
Sat Jun 11 08:07:43 UTC 2011
On Mon, Jun 06, 2011 at 11:56:51PM +0300, Ville Skyttä wrote:
> 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):
Well I simply reverted the offending hunk (not understanding why it breaks my
setup). That would be this one:
--- a/bash_completion.d/mutt
+++ b/bash_completion.d/mutt
@@ -61,7 +61,7 @@ _muttconffiles()
while [[ "$1" ]]; do
newconffiles=( $(sed -n 's|^source[[:space:]]\{1,\}\([^[:space:]]\{1,\}\).*$|\1|p' $(eval echo $1) ) )
for file in "${newconffiles[@]}"; do
- [[ ! "$file" || "${sofar/ ${file} / }" != "$sofar" ]] &&
+ [[ ! -f "$file" || "${sofar/ ${file} / }" != "$sofar" ]] &&
continue
sofar="$sofar $file"
sofar=" $(eval _muttconffiles \"$sofar\" $file) "
This works fine for me, but it would cause another bug to reappear for
other users. In any case you do have a reproducible test case now, so
you should be able to test your proposed solutions by yourself instead
of throwing random untested hunks at me.
Helmut
More information about the Bash-completion-devel
mailing list