On Wed, Mar 20, 2002 at 12:43:19AM -0700, Tres Hofmeister wrote: > I'm wondering if there's a way to bind complete and > complete-query to the same key, rather than two keys as shown in > the manual: > > <Tab> complete complete filename or alias > ^T complete-query complete address with query > > I'd like to hit the tab key, and see first my aliases matching > my string, and then the results of an external query to an LDAP server. > It would also be O.K. to see the external query results only if there > was no alias match. > > I have the LDAP query working, but at the moment it is bound > to ^T. Is this even possible? Any suggestions? Thanks...
Here's a thought. Have you looked into the Little Brother's Database? It's a really neat tool for accessing a collection of various address databases from one interface. You could use the m_muttalias and m_ldap modules to query both your mutt aliases file and your LDAP server. Then you could either let mutt display all the addresses found, as it usually does, or you could define mutt's query_command like this: set query_command="lbdbq '%s' | sed '3,\$d'" and select only the first result returned by lbdbq. You can configure lbdbq so that the first result is the one from your mutt aliases file. And of course the solution using sed assumes that you always want the first result and it won't even show you multiple matches, but maybe you can tune this to get what you want in your situation. You can find out more about The Little Brother's Database here: http://www.spinnaker.de/lbdb/ HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Spokane, Washington, USA http://www.spocom.com/users/gjohnson/mutt/ |