<<< Date Index >>>     <<< Thread Index >>>

Re: Mutt and mairix



* danny on Sunday, May 07, 2006 at 18:03:43 +0200:
> I can get mairix with the following macro:
> generic \eS <shell-escape>mairix </return>
> 
> But I want mutt to auto change to mairix's mfolder
> after I submitted the mairix search string.
> 
> Can it be done?

Only with a little wrapper around mairix, I believe. At least
that's how I do it. Put the following script in your $PATH and
call it eg. mairixquery.sh:

#!/bin/sh
thread=
append=
YORN ()
{
        printf "$1 (yes/[no]) "
        read -e yorn
        case "$yorn" in
                y*|Y*) return 0;;
                *) return 1;;
        esac
}
printf "Enter mairix query:\n"
read -e query
[ -n "$query" ] || exit 0
YORN "Retrieve thread?" && thread="-t"
YORN "Append message(s) to mfolder?" && append="-a"
mairix $thread $append "$query"

and in your .muttrc something like:

macro index,pager ,m \
<shell-escape>mairixquery.sh<enter>\
<change-folder>+incoming/mairix/mfolder<enter> "mairix query"

c
-- 
_B A U S T E L L E N_ lesen!  --->> <http://www.blacktrash.org/baustellen.html>