From: Junio C Hamano Date: Tue, 16 Feb 2021 02:14:39 GMT Subject: Re: git-send-email: smtpserver in $HOME Message-ID: In-Reply-To: Jan “Khardix” Staněk 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) {