Add parsing of elm aliases to git-send-email
elm stores a text file version of the aliases that is <alias> = <comment> = <email address> This adds the parsing of this file to git-send-email Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Bill Pemberton committed
Apr 22, 2009 at 09:41 UTC
7613ea3595f3a56f0f9d827944775940f1e72ef6
2 files changed
+9
-1
Documentation/git-send-email.txt
+1
-1
@@ -262,7 +262,7 @@ sendemail.aliasesfile::
262
263
sendemail.aliasfiletype::
264
Format of the file(s) specified in sendemail.aliasesfile. Must be
265
- one of 'mutt', 'mailrc', 'pine', or 'gnus'.
265
+ one of 'mutt', 'mailrc', 'pine', 'elm', or 'gnus'.
266
267
sendemail.multiedit::
268
If true (default), a single editor instance will be spawned to edit
git-send-email.perl
+8
@@ -418,6 +418,14 @@ my %parse_alias = (
418
$x =~ /^(\S+)$f\t\(?([^\t]+?)\)?(:?$f){0,2}$/ or next;
419
$aliases{$1} = [ split_addrs($2) ];
420
}},
421
+ elm => sub { my $fh = shift;
422
+ while (<$fh>) {
423
+ if (/^(\S+)\s+=\s+[^=]+=\s(\S+)/) {
424
+ my ($alias, $addr) = ($1, $2);
425
+ $aliases{$alias} = [ split_addrs($addr) ];
426
+ }
427
+ } },
428
+
429
gnus => sub { my $fh = shift; while (<$fh>) {
430
if (/\(define-mail-alias\s+"(\S+?)"\s+"(\S+?)"\)/) {
431
$aliases{$1} = [ $2 ];