Code

send-email: fix mutt regex for grouped aliases
authorFelipe Contreras <felipe.contreras@gmail.com>
Wed, 30 Sep 2009 14:49:36 +0000 (17:49 +0300)
committerJeff King <peff@peff.net>
Thu, 1 Oct 2009 08:18:36 +0000 (04:18 -0400)
For example:
alias -group friends foo Foo Bar <foo@bar.com>

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Acked(-and-tested)-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Jeff King <peff@peff.net>
git-send-email.perl

index dd821f70cd5e38afeff090e6d5a547096abcbddf..f5ba4e7699936499021a8a955b198668b98a1696 100755 (executable)
@@ -401,7 +401,7 @@ my %aliases;
 my %parse_alias = (
        # multiline formats can be supported in the future
        mutt => sub { my $fh = shift; while (<$fh>) {
-               if (/^\s*alias\s+(\S+)\s+(.*)$/) {
+               if (/^\s*alias\s+(?:-group\s+\S+\s+)*(\S+)\s+(.*)$/) {
                        my ($alias, $addr) = ($1, $2);
                        $addr =~ s/#.*$//; # mutt allows # comments
                         # commas delimit multiple addresses