send-email: fix mutt regex for grouped aliases
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>
This commit is contained in:
parent
1be224ba6e
commit
ffc01f9bad
@ -401,7 +401,7 @@ my %aliases;
|
|||||||
my %parse_alias = (
|
my %parse_alias = (
|
||||||
# multiline formats can be supported in the future
|
# multiline formats can be supported in the future
|
||||||
mutt => sub { my $fh = shift; while (<$fh>) {
|
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);
|
my ($alias, $addr) = ($1, $2);
|
||||||
$addr =~ s/#.*$//; # mutt allows # comments
|
$addr =~ s/#.*$//; # mutt allows # comments
|
||||||
# commas delimit multiple addresses
|
# commas delimit multiple addresses
|
||||||
|
Loading…
Reference in New Issue
Block a user