Public bug reported:

Binary package hint: bash-completion

Expected vs observed behaviour
==============================
When typing
$ mutt -f =k<TAB>
bash-completion should offer mailboxes starting with "k"

Instead, bash gives the error message
$ mutt -f =kbash: ~/.mutt/muttquery: No such file or directory

Bug 1: Completion produces a bash error
Bug 2: Completion executes mutt's query_command, which is intended for 
retrieving email addresses, not mail boxes

Analysis
========
- Pressing <TAB> invokes bash completion, which calls "_muttquery" from 
/etc/bash_completion.d/mutt
- "_muttquery" calls "mutt -Q query_command", which in my case returns the 
string
query_command="~/.mutt/muttquery '%s'"
- "_muttquery" extracts the substring "~/.mutt/muttquery '%s'" (without 
surrounding quotes), replaces %s by "'\''k'\''" (without surrounding quotes), 
and then executes the bash command
'~/.mutt/muttquery' ''\''k'\'''

Since the tilde is quoted by single quotes, bash does not expand it to
the home dir, but interprets it literally. Hence the observed bash error
message.

Bug 1: Completion should not single-quote tildes which are expected to be 
expanded by bash.
Bug 2: Completion should not call _muttquery since there is no mail address 
expected after "-f ="

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: bash-completion 1:1.1-3ubuntu2
ProcVersionSignature: Ubuntu 2.6.32-25.44-generic 2.6.32.21+drm33.7
Uname: Linux 2.6.32-25-generic i686
Architecture: i386
Date: Wed Oct  6 18:08:40 2010
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release i386 (20100816.1)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_IE.utf8
 SHELL=/bin/bash
SourcePackage: bash-completion

** Affects: bash-completion (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug i386 lucid

-- 
/etc/bash_completion.d/mutt quotes tilde which cannot be expanded by bash (or: 
why is query_command invoked at this place at all?)
https://bugs.launchpad.net/bugs/655849
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to