mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-07-01 10:29:25 +00:00
committed by
Sorin Ionescu
parent
5232191cbe
commit
fb9a20591f
@ -11,7 +11,7 @@ Settings
|
||||
To auto set the terminal window and tab titles with the current command or
|
||||
directory, add the following to *zshrc*:
|
||||
|
||||
zstyle ':omz:module:terminal' auto-title 'yes'
|
||||
zstyle ':prezto:module:terminal' auto-title 'yes'
|
||||
|
||||
Authors
|
||||
-------
|
||||
@ -21,5 +21,5 @@ Authors
|
||||
- [James Cox](https://github.com/imajes)
|
||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||
|
||||
[1]: https://github.com/sorin-ionescu/oh-my-zsh/issues
|
||||
[1]: https://github.com/sorin-ionescu/prezto/issues
|
||||
|
||||
|
@ -78,7 +78,7 @@ autoload -Uz add-zsh-hook
|
||||
|
||||
# Sets the tab and window titles before the prompt is displayed.
|
||||
function set-title-precmd {
|
||||
if zstyle -t ':omz:module:terminal' auto-title; then
|
||||
if zstyle -t ':prezto:module:terminal' auto-title; then
|
||||
if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]]; then
|
||||
# Set the current working directory in Apple Terminal.
|
||||
printf '\e]7;%s\a' "file://$HOST${PWD// /%20}"
|
||||
@ -95,7 +95,7 @@ add-zsh-hook precmd set-title-precmd
|
||||
|
||||
# Sets the tab and window titles before command execution.
|
||||
function set-title-preexec {
|
||||
if zstyle -t ':omz:module:terminal' auto-title; then
|
||||
if zstyle -t ':prezto:module:terminal' auto-title; then
|
||||
if [[ "$TERM_PROGRAM" != 'Apple_Terminal' ]]; then
|
||||
set-title-by-command "$2"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user