Re: [PATCH 2/2] pretty: add '%aA' to show domain-part of email addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 04/11/2023 01:54, Junio C Hamano wrote:
Andy Koppe <andy.koppe@xxxxxxxxx> writes:

I'm not sure that this is the right way to handle a missing '@' here
actually, because %al already returns the whole email field in that
case, which makes sense as the likes of the 'mail' command would
interpret it as a local username.

We could expand "%am" to \C-h (\010) so that "%al@%am" would end up
displaying the same as "%al" but that would be way too cute for its
own worth ;-)

:)

Unfortunately it also wouldn't always work, because ^H only moves the cursor, so if the next thing is a newline, the '@' wouldn't actually get deleted.

It is unfortunate that "%al@%am" cannot be the same as "%ae" for
local-only address, but giving an empty string for "%am" if "%ae" is
local-only would be the best we could do for our users, and certainly
much better than giving the same as "%ae", as you said above.

I suppose "%@am" could mean prepending an '@' when a domain is present, similar to how "% am" would mean prepending a space and "%+am" would mean prepending a newline. With that, "%al%@am" would be equivalent to "%ae".

But that then raises the question whether it should be implemented just for "%@[ac][mM]", or for all placeholders. In any case, I don't think it needs to be part of the changes at hand.

Andy




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux