2021-11-12 10:14:16 -08:00
|
|
|
---
|
2022-04-20 09:43:59 -07:00
|
|
|
id: title
|
2021-11-12 10:14:16 -08:00
|
|
|
title: Console title
|
|
|
|
sidebar_label: Console title
|
|
|
|
---
|
|
|
|
|
2024-11-02 13:46:16 -07:00
|
|
|
import Config from "@site/src/components/Config.js";
|
|
|
|
|
|
|
|
<Config
|
|
|
|
data={{
|
|
|
|
console_title_template:
|
|
|
|
"{{.Folder}}{{if .Root}} :: root{{end}} :: {{.Shell}}",
|
|
|
|
}}
|
|
|
|
/>
|
2021-11-12 10:14:16 -08:00
|
|
|
|
|
|
|
### Console Title Template
|
|
|
|
|
|
|
|
The following examples illustrate possible contents for `console_title_template`, provided
|
|
|
|
the current working directory is `/usr/home/omp` and the shell is `zsh`.
|
|
|
|
|
2022-01-22 10:46:56 -08:00
|
|
|
To learn more about templates and their possibilities, have a look at the [template][templates] section.
|
|
|
|
|
2021-11-12 10:14:16 -08:00
|
|
|
```json
|
|
|
|
{
|
2024-11-02 13:46:16 -07:00
|
|
|
"console_title_template": "{{.Folder}}{{if .Root}} :: root{{end}} :: {{.Shell}}",
|
|
|
|
// outputs:
|
|
|
|
// when root == false: omp :: zsh
|
|
|
|
// when root == true: omp :: root :: zsh
|
|
|
|
"console_title_template": "{{.Folder}}", // outputs: omp
|
|
|
|
"console_title_template": "{{.Shell}} in {{.PWD}}", // outputs: zsh in /usr/home/omp
|
|
|
|
"console_title_template": "{{.UserName}}@{{.HostName}} {{.Shell}} in {{.PWD}}", // outputs: MyUser@MyMachine zsh in /usr/home/omp
|
|
|
|
"console_title_template": "{{.Env.USERDOMAIN}} {{.Shell}} in {{.PWD}}" // outputs: MyCompany zsh in /usr/home/omp
|
2021-11-12 10:14:16 -08:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
[sprig]: https://masterminds.github.io/sprig/
|
2022-04-20 09:43:59 -07:00
|
|
|
[templates]: /docs/configuration/templates
|