Add new_command setting

new_command will get executed when the current mailbox receives new
mail. Two values are formatted into this string, the first is the number
of new messages and the second the number of unread messages.

If this value is not set, no command is executed.

---------------------

This is how my muttrc file looks:

     set new_command="notifier --title 'Mutt' --subtitle 'New Mail' --message '%d new messages, %d unread.'"

You can find notifier [here](https://gist.github.com/ElDeveloper/f7e8b19aff23550af426).

--------------------

See animated gif:

![mutt-demo](https://cloud.githubusercontent.com/assets/375307/4230044/1c4dc3a4-397d-11e4-84ae-b4d1073c8d0c.gif)
You mean moving this declaration to the top of the function? I would
agree but it seems like they do this kind of thing throughout the code
so I was trying to make it as similar as possible.

On (Sep-11-14| 8:18), Santiago Torres wrote:
> > @@ -575,6 +575,12 @@ int mutt_index_menu (void)
> >  	  mutt_message _("New mail in this mailbox.");
> >  	  if (option (OPTBEEPNEW))
> >  	    beep ();
> > +      if (NewCmd)
> > +      {
> > +        char cmd[strlen(NewCmd)];
> 
> Maybe we should declare this in the function declaration.
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/ElDeveloper/mutt/pull/2/files#r17427062