Re: [PATCH 2/2] pretty: add '%aA' to show domain-part of email addresses
- From
Andy Koppe <andy.koppe@gmail.com>
- Date
- Oct 28, 2023, 06:58 UTC
- Message-ID
- <9a1e3e90-3e94-41fa-897d-5c64c4a42871@gmail.com>
- In-Reply-To
- <20231028032221.GB1784118@shaak>
On 28/10/2023 04:22, Liam Beguin wrote:
Show 7 quoted lines
> On Fri, Oct 27, 2023 at 10:13:01PM -0400, Jeff King wrote: >> One way you could directly use this is in shortlog, which these days >> lets you group by specific formats. So: >> >> git shortlog -ns --group=format:%aA > > That's exactly what I implemented this for :-)
Another potential use case is custom log formats where one might want to color the local-part separately from the domain part.
>> It also feels like a symmetric match to "%al", which already exists.
Speaking of symmetry, I think it would need "%c" counterparts for the coloring use case.
> I chose the "a" for "address", but I'm not sold on %aa either. > I just couldn't find anything better that wasn't already taken. > > What about "a@"?
Makes sense, and I suppose there's "%G?" as precedent for using a symbol rather than letter in these.
If that's not suitable though, how about "m" for "mail domain"? It also immediately follows "l" for "local-part" in the alphabet.
Regards, Andy