mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 23:08:00 +00:00
Set title in screen even when using Apple Terminal
In modules/terminal/init.zsh, the auto-title code currently will only set the screen title if $TERM_PROGRAM != 'Apple_Terminal'. As a result, if you use screen within an Apple Terminal, the screen title will not be correctly set. To fix this, I changed the logic such that the screen title will be set even if the $TERM_PROGRAM == 'Apple Terminal'.
This commit is contained in:
parent
c8b82afeec
commit
07a25e6ae6
@ -79,7 +79,7 @@ autoload -Uz add-zsh-hook
|
|||||||
# Sets the tab and window titles before the prompt is displayed.
|
# Sets the tab and window titles before the prompt is displayed.
|
||||||
function set-title-precmd {
|
function set-title-precmd {
|
||||||
if zstyle -t ':prezto:module:terminal' auto-title; then
|
if zstyle -t ':prezto:module:terminal' auto-title; then
|
||||||
if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]]; then
|
if [[ "$TERM_PROGRAM" == 'Apple_Terminal' && "$TERM" != screen* ]]; then
|
||||||
# Set the current working directory in Apple Terminal.
|
# Set the current working directory in Apple Terminal.
|
||||||
printf '\e]7;%s\a' "file://$HOST${PWD// /%20}"
|
printf '\e]7;%s\a' "file://$HOST${PWD// /%20}"
|
||||||
else
|
else
|
||||||
@ -96,7 +96,7 @@ add-zsh-hook precmd set-title-precmd
|
|||||||
# Sets the tab and window titles before command execution.
|
# Sets the tab and window titles before command execution.
|
||||||
function set-title-preexec {
|
function set-title-preexec {
|
||||||
if zstyle -t ':prezto:module:terminal' auto-title; then
|
if zstyle -t ':prezto:module:terminal' auto-title; then
|
||||||
if [[ "$TERM_PROGRAM" != 'Apple_Terminal' ]]; then
|
if [[ "$TERM_PROGRAM" != 'Apple_Terminal' || "$TERM" == screen* ]]; then
|
||||||
set-title-by-command "$2"
|
set-title-by-command "$2"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user