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

Re: Starting shell command with name of current mailbox as



> Can I somehow write a macro, which starts a shell command with the currently 
> selected Mailbox as argument?
Well, I can get you started on that anyway.  With the help of Kyle
Wheeler and Patrick Shanahan, we have a way to get the currently
selected mailbox into a mutt variable, like so:

folder-hook . "set my_oldrecord=\$record"
folder-hook . "set record=^"
folder-hook . "set my_curdir=\$record"
folder-hook . "set record=\$my_oldrecord"

This method hijacks the special functionality of $record to interpret
the "^", which contains the name of the current mailbox, while still
preserving $record.  $my_curdir ends up with the full path of the
mailbox, set when you change into that mailbox.

As yet I don't know how to pass a mutt variable as the argument to a
shell command.  I had a post to the mailing list asking how to do this
but never got any responses, and haven't had time since then to follow
up.  I am quite interested in how to do this, however.  So I guess that
makes this post half helpful and half "me too!".

Cheers,
-- 
Noah Sheppard
Assistant Computer Resource Manager
Taylor University CSE Department
nsheppar@xxxxxxxxxxxxxx