Re: git-send-email: smtpserver in $HOME
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 16, 2021, 02:14 UTC
- Message-ID
- <xmqqo8gksqr4.fsf@gitster.c.googlers.com>
- In-Reply-To
- <CAG+K25Pk0+sOAYuWS2OF7CXLXJLjGMKyBB_SOLpoO5RFiktN5g@mail.gmail.com>
Jan “Khardix” Staněk <khardix@gmail.com> writes:
> Would it be feasible to treat the `smtpserver` as path option > and expand `~`/`~user` paths? > Would it break anything > (i.e., is `~` a valid character for beginning of a hostname)?
I haven't given too much thought, but offhand do not think of a reason why a change like the attached would break things.
git-send-email.perl | 2 ++ 1 file changed, 2 insertions(+)
diff --git c/git-send-email.perl w/git-send-email.perl index 1f425c0809..ff58ac5046 100755 --- c/git-send-email.perl +++ w/git-send-email.perl @@ -1006,6 +1006,8 @@ sub expand_one_alias { } } $smtp_server ||= 'localhost'; # could be 127.0.0.1, too... *shrug* +} elsif ($smtp_server =~ /^~/) { + $smtp_server = glob($smtp_server); } if ($compose && $compose > 0) {