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

Re: Does mutt have any concept of "where I am now"?



On Mon, Aug 13, 2007 at 03:36:39PM +0200, Kai Grossjohann wrote:
> On Mon, Aug 13, 2007 at 09:35:39AM +0100, Chris G wrote:
> 
> > However, taking thought, it should be possible to auto-generate the
> > folder-hook commands without to much difficulty a simple shell script
> > using 'find' starting at /home/chris/Mail would do what I want and you
> > can then use `run the script` in muttrc.
> 
> It seems the following does the trick in my environment:
> 
> find Mail -type d | while read d; do test -d "$d/cur" && echo $d; done
> 
> I guess I could just replace "echo $d" with a command that prints the
> entire .muttrc line.
> 
> Kai

I swiped a bit of code from someone else to build my mailboxes list, you may
be able to modify it to suit your needs:

http://technomage.net/dotfiles/muttrc/mailboxes.html

mailboxes ! + `\
    for file in ~/Maildir/.*; do \
        if [ -d $file ]; then \
            box=$(/usr/bin/basename "$file"); \
            if [ ! "$box" = '.Spam' \
                -a ! "$box" = '.Trash' \
                -a ! "$box" = '.junk' \
                -a ! "$box" = '.' \
                -a ! "$box" = '..' ]; then \
                echo -n "\"+$box\" "; \
            fi; \
        fi; \
    done`


-- 
Matt Okeson-Harlow
Sen gutoj malgrandaj maro ne ekzistus

Attachment: signature.asc
Description: Digital signature