mutt -f =FOO<tab> and mutt -f +FOO<tab> are broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash-completion (Ubuntu) |
New
|
Low
|
Unassigned |
Bug Description
Here are two closely-related bugs in Mutt tab-completion. My muttrc sets folder=~/Mail, and I've a mailbox named UNKNOWN-LIST. I can open it by typing either 'mutt -f =UNKNOWN-LIST' or 'mutt -f +UNKNOWN-LIST'. As you can imagine, that's more typing than I like. I want tab-completion.
Bug #1: 'mutt -f +U<tab>' completes to 'mutt -f UNKNOWN-LIST', i.e. it loses the leading '+'. Fix:
--- a/bash_
+++ b/bash_
@@ -87,6 +87,10 @@ _muttfiledir()
# (minus the leading '=' sign).
+ # mg: fix mutt -f +FOO<tab>
+ if [[ $cur == [+]* ]]; then
+ COMPREPLY=( +${COMPREPLY[
+ fi
return 0
elif [ "$cur" == !* ]; then
Bug #2: 'mutt -f =U<tab>' fails to complete folder names (instead it tries to complete aliases). Fix:
--- a/bash_
+++ b/bash_
@@ -75,7 +75,7 @@ _muttquery()
_muttfiledir()
{
local cur folder spoolfile muttcmd=
- cur=`_get_cword`
+ cur=`_get_cword =`
# This is currently not working so well. Perhaps this function should
# just call _filedir() for the moment.
@@ -101,8 +105,12 @@ _muttfiledir()
_mutt()
{
local cur prev
- cur=`_get_cword`
+ cur=`_get_cword =`
prev=
+ # mg: fix mutt -f =FOO<tab>
+ if [[ $prev == "=" ]]; then
+ prev=${
+ fi
COMPREPLY=()
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: bash-completion 1:1.1-3ubuntu2
ProcVersionSign
Uname: Linux 2.6.32-41-server x86_64
Architecture: amd64
Date: Mon Jun 4 11:12:53 2012
PackageArchitec
SourcePackage: bash-completion
Changed in bash-completion (Ubuntu): | |
importance: | Undecided → Low |
On Ubuntu 13.10, with bash-completion 1:2.0-1ubuntu3:
- mutt -f =U<tab> completes to mutt -f UNKNOWN-LIST
- mutt -f +U<tab> completes to mutt -f UNKNOWN-LIST
In both cases the prefix is lost.
Related bugs (probably duplicates): /bugs.launchpad .net/ubuntu/ +source/ bash-completion /+bug/655849
- https:/
Upstream bugs: /alioth. debian. org/tracker/ ?group_ id=100114& atid=413095& func=detail& aid=312184 /alioth. debian. org/tracker/ ?group_ id=100114& atid=413095& func=detail& aid=312760 /alioth. debian. org/tracker/ ?group_ id=100114& atid=413095& func=detail& aid=313189
- https:/
- https:/
- https:/