Skip to main content

Session

What​

Show the current user and host name.

Sample Configuration​

− ▢ × alice _ ohmyposh.dev − ▢ × alice _ ohmyposh.dev

Template (info)​

default template
{
"template": " {{ if .SSHSession }} {{ end }}{{ .UserName }}@{{ .HostName }} "
}

Properties​

NameTypeDescription
.UserNamestringthe current user's name
.HostNamestringthe current computer's name
.SSHSessionbooleanactive SSH session or not
.Rootbooleanare you a root/admin user or not