* [PATCH] send-email: fix mutt regex for grouped aliases
@ 2009-09-30 0:08 Felipe Contreras
2009-09-30 11:28 ` Jeff King
0 siblings, 1 reply; 6+ messages in thread
From: Felipe Contreras @ 2009-09-30 0:08 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Eric Wong, Felipe Contreras
For example:
alias -group friends foo Foo Bar <foo@bar.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
git-send-email.perl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 0700d80..ec43a5e 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -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
--
1.6.5.rc2.1.gec34
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] send-email: fix mutt regex for grouped aliases
2009-09-30 0:08 [PATCH] send-email: fix mutt regex for grouped aliases Felipe Contreras
@ 2009-09-30 11:28 ` Jeff King
2009-09-30 14:49 ` [PATCH v2] " Felipe Contreras
2009-09-30 14:50 ` [PATCH] " Felipe Contreras
0 siblings, 2 replies; 6+ messages in thread
From: Jeff King @ 2009-09-30 11:28 UTC (permalink / raw)
To: Felipe Contreras; +Cc: git, Junio C Hamano, Eric Wong
On Wed, Sep 30, 2009 at 03:08:43AM +0300, Felipe Contreras wrote:
> For example:
> alias -group friends foo Foo Bar <foo@bar.com>
Hmm. If I am reading the mutt docs correctly, is it also legal to have:
alias -group group1 -group group2 foo Foo Bar <foo@bar.com>
?
Which would need just:
> - if (/^\s*alias\s+(\S+)\s+(.*)$/) {
> + if (/^\s*alias\s+(?:-group\s+\S+\s+)?(\S+)\s+(.*)$/) {
(?:-group\s+\S+\s+)*
I think.
-Peff
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] send-email: fix mutt regex for grouped aliases
2009-09-30 11:28 ` Jeff King
@ 2009-09-30 14:49 ` Felipe Contreras
2009-09-30 20:55 ` Eric Wong
2009-09-30 14:50 ` [PATCH] " Felipe Contreras
1 sibling, 1 reply; 6+ messages in thread
From: Felipe Contreras @ 2009-09-30 14:49 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Eric Wong, Jeff King, Felipe Contreras
For example:
alias -group friends foo Foo Bar <foo@bar.com>
Comments by Jeff King.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
git-send-email.perl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 0700d80..93b7ed2 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -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
--
1.6.5.rc2.1.g9071
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] send-email: fix mutt regex for grouped aliases
2009-09-30 14:49 ` [PATCH v2] " Felipe Contreras
@ 2009-09-30 20:55 ` Eric Wong
2009-10-01 0:22 ` Jeff King
0 siblings, 1 reply; 6+ messages in thread
From: Eric Wong @ 2009-09-30 20:55 UTC (permalink / raw)
To: Felipe Contreras; +Cc: git, Junio C Hamano, Jeff King
Felipe Contreras <felipe.contreras@gmail.com> wrote:
> For example:
> alias -group friends foo Foo Bar <foo@bar.com>
>
> Comments by Jeff King.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Interesting, I didn't know about this feature in mutt before.
Acked(-and-tested)-by: Eric Wong <normalperson@yhbt.net>
> ---
> git-send-email.perl | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 0700d80..93b7ed2 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -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
> --
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] send-email: fix mutt regex for grouped aliases
2009-09-30 20:55 ` Eric Wong
@ 2009-10-01 0:22 ` Jeff King
0 siblings, 0 replies; 6+ messages in thread
From: Jeff King @ 2009-10-01 0:22 UTC (permalink / raw)
To: Eric Wong; +Cc: Felipe Contreras, git, Junio C Hamano
On Wed, Sep 30, 2009 at 01:55:01PM -0700, Eric Wong wrote:
> Felipe Contreras <felipe.contreras@gmail.com> wrote:
> > For example:
> > alias -group friends foo Foo Bar <foo@bar.com>
> >
> > Comments by Jeff King.
> >
> > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>
> Interesting, I didn't know about this feature in mutt before.
>
> Acked(-and-tested)-by: Eric Wong <normalperson@yhbt.net>
Nor did I, which is why I was reading the docs. :) The v2 patch looks
good to me, as well.
-Peff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] send-email: fix mutt regex for grouped aliases
2009-09-30 11:28 ` Jeff King
2009-09-30 14:49 ` [PATCH v2] " Felipe Contreras
@ 2009-09-30 14:50 ` Felipe Contreras
1 sibling, 0 replies; 6+ messages in thread
From: Felipe Contreras @ 2009-09-30 14:50 UTC (permalink / raw)
To: Jeff King; +Cc: git, Junio C Hamano, Eric Wong
On Wed, Sep 30, 2009 at 2:28 PM, Jeff King <peff@peff.net> wrote:
> On Wed, Sep 30, 2009 at 03:08:43AM +0300, Felipe Contreras wrote:
>
>> For example:
>> alias -group friends foo Foo Bar <foo@bar.com>
>
> Hmm. If I am reading the mutt docs correctly, is it also legal to have:
>
> alias -group group1 -group group2 foo Foo Bar <foo@bar.com>
>
> ?
>
> Which would need just:
>
>> - if (/^\s*alias\s+(\S+)\s+(.*)$/) {
>> + if (/^\s*alias\s+(?:-group\s+\S+\s+)?(\S+)\s+(.*)$/) {
>
> (?:-group\s+\S+\s+)*
>
> I think.
Yeap, that is correct. Resent.
--
Felipe Contreras
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-10-01 0:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-30 0:08 [PATCH] send-email: fix mutt regex for grouped aliases Felipe Contreras
2009-09-30 11:28 ` Jeff King
2009-09-30 14:49 ` [PATCH v2] " Felipe Contreras
2009-09-30 20:55 ` Eric Wong
2009-10-01 0:22 ` Jeff King
2009-09-30 14:50 ` [PATCH] " Felipe Contreras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).