From 9a8a7b7d5a87b1ac588c00afe73a167a30c23865 Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Fri, 5 Mar 2021 15:41:22 +0100 Subject: prettyprompt: show hostname and shortened pwd in terminal title --- internal/prompt/login.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/prompt/login.go') diff --git a/internal/prompt/login.go b/internal/prompt/login.go index 92cc270..187ae79 100644 --- a/internal/prompt/login.go +++ b/internal/prompt/login.go @@ -25,7 +25,7 @@ import "os" //#include import "C" -func getLoginField() string { +func getLoginField(tt *TerminalTitle) string { var result string //show user name @@ -45,6 +45,7 @@ func getLoginField() string { handleError(err) hostname = "" } + tt.HostName = hostname return result + withColor( getenvOrDefault("PRETTYPROMPT_HOSTCOLOR", "0;33"), hostname, -- cgit v1.3.1