git-send-email: allow leading white space on mutt aliases
mutt version 1.5.14 (perhaps earlier versions too) permits alias files to have white space before the 'alias' keyword. Signed-off-by: Michael Hendricks <michael@ndrix.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
0ab564be6e
commit
504ceab6d2
@ -212,7 +212,7 @@ my $aliasfiletype = $repo->config('sendemail.aliasfiletype');
|
|||||||
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 (/^alias\s+(\S+)\s+(.*)$/) {
|
if (/^\s*alias\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