Session
What
Show the current user and host name.
Sample Configuration
- json
- yaml
- toml
Template (info)
default template
- json
- yaml
- toml
{
"template": " {{ if .SSHSession }} {{ end }}{{ .UserName }}@{{ .HostName }} "
}
template: " {{ if .SSHSession }} {{ end }}{{ .UserName }}@{{ .HostName }} "
template = " {{ if .SSHSession }} {{ end }}{{ .UserName }}@{{ .HostName }} "
Properties
| Name | Type | Description |
|---|---|---|
.UserName | string | the current user's name |
.HostName | string | the current computer's name |
.SSHSession | boolean | active SSH session or not |
.Root | boolean | are you a root/admin user or not |