diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2021-03-05 15:41:22 +0100 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2021-03-05 15:41:22 +0100 |
| commit | 9a8a7b7d5a87b1ac588c00afe73a167a30c23865 (patch) | |
| tree | f6e75261e3142af91e117c61e1f56c62b0b58d7c /internal/prompt/login.go | |
| parent | 122068efd4a348921b736b4456d4e1c999dbfb79 (diff) | |
| download | gofu-9a8a7b7d5a87b1ac588c00afe73a167a30c23865.tar.gz | |
prettyprompt: show hostname and shortened pwd in terminal title
Diffstat (limited to 'internal/prompt/login.go')
| -rw-r--r-- | internal/prompt/login.go | 3 |
1 files changed, 2 insertions, 1 deletions
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 <unistd.h> 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 = "<unknown>" } + tt.HostName = hostname return result + withColor( getenvOrDefault("PRETTYPROMPT_HOSTCOLOR", "0;33"), hostname, |
