2021-05-04 01:59:31 +00:00
|
|
|
# Terminal
|
2012-06-14 21:55:09 +00:00
|
|
|
|
|
|
|
Sets terminal window and tab titles.
|
|
|
|
|
2021-05-04 01:59:31 +00:00
|
|
|
## Settings
|
2012-06-14 21:55:09 +00:00
|
|
|
|
|
|
|
### Auto-Title
|
|
|
|
|
2013-08-27 19:53:49 +00:00
|
|
|
To auto set the terminal window and tab titles with the current command or
|
2021-05-04 01:59:31 +00:00
|
|
|
directory, add the following to *~/.zpreztorc*:
|
2012-06-14 21:55:09 +00:00
|
|
|
|
2017-07-21 01:07:29 +00:00
|
|
|
```sh
|
|
|
|
zstyle ':prezto:module:terminal' auto-title 'yes'
|
|
|
|
```
|
2013-08-27 19:53:49 +00:00
|
|
|
|
2021-05-04 01:59:31 +00:00
|
|
|
Auto titling is disabled inside terminal multiplexers (except inside dvtm) since
|
|
|
|
it interferes with window names defined in configuration files and profile
|
|
|
|
managers. This can be overridden by setting it to `always`.
|
2014-04-28 02:19:52 +00:00
|
|
|
|
2017-07-21 01:07:29 +00:00
|
|
|
```sh
|
|
|
|
zstyle ':prezto:module:terminal' auto-title 'always'
|
|
|
|
```
|
2014-04-28 02:19:52 +00:00
|
|
|
|
|
|
|
### Title formats
|
2012-06-14 21:55:09 +00:00
|
|
|
|
2021-05-04 01:59:31 +00:00
|
|
|
To format terminal window and tab titles, add the following to *~/.zpreztorc*:
|
2013-08-28 21:13:14 +00:00
|
|
|
|
2017-07-21 01:07:29 +00:00
|
|
|
```sh
|
|
|
|
zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s'
|
|
|
|
zstyle ':prezto:module:terminal:tab-title' format '%m: %s'
|
|
|
|
zstyle ':prezto:module:terminal:multiplexer-title' format '%s'
|
|
|
|
```
|
2013-08-28 21:13:14 +00:00
|
|
|
|
|
|
|
`%s` will be replaced with the current working directory path or the currently
|
|
|
|
executing program name.
|
|
|
|
|
|
|
|
For a list of sequences, see [Expansion of Prompt Sequences][1].
|
|
|
|
|
2021-05-04 01:59:31 +00:00
|
|
|
## Functions
|
2012-09-25 05:30:20 +00:00
|
|
|
|
2013-08-27 19:53:49 +00:00
|
|
|
- `set-tab-title` sets the terminal tab title.
|
2014-04-28 02:19:52 +00:00
|
|
|
- `set-window-title` sets the terminal window title.
|
|
|
|
- `set-multiplexer-title` sets the terminal multiplexer title.
|
2012-09-25 05:30:20 +00:00
|
|
|
|
2021-05-04 01:59:31 +00:00
|
|
|
## Authors
|
2012-06-14 21:55:09 +00:00
|
|
|
|
2013-08-28 21:13:14 +00:00
|
|
|
*The authors of this module should be contacted via the [issue tracker][2].*
|
2012-06-14 21:55:09 +00:00
|
|
|
|
2021-05-04 01:59:31 +00:00
|
|
|
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
|
|
|
- [Olaf Conradi](https://github.com/oohlaf)
|
2012-06-14 21:55:09 +00:00
|
|
|
|
2021-05-04 01:59:31 +00:00
|
|
|
[1]: https://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Expansion-of-Prompt-Sequences
|
2013-08-28 21:13:14 +00:00
|
|
|
[2]: https://github.com/sorin-ionescu/prezto/issues
|