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

Re: Creating list of "mailboxes" dynamically



Hallo,

On Thu, Sep 21, 2006 at 09:19:04PM -0400, John J. Foster wrote:
[...]
> figure out how to get it sorted. Can anyone help me out? This is
> what's in muttrc right now.
> 
> # Which mailboxes should be watched for new mail
> mailboxes \
>         =FastMail/INBOX \
>         `cd ~/Maildir; find FastMail -maxdepth 1 -mindepth 1 -type d \
>         ! -name INBOX ! -name Trash ! -name sent ! -name Read \
>         -printf "+%p "`

Either use sort in a pipe with find or use the shell (which sorts also
the filenames) 
# begin mailboxes
#!/bin/bash
cd $HOME/Mail

shopt -s extglob
echo -n mailboxes
echo -n " !"
for i in !(Sent|caughtspam)
do
  echo -n " +$i"
done
echo
#end mailboxes

and "source ~/.mutt/mailboxes|" in my muttrc.

Greetings
Sebastian Waschik