mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 23:08:00 +00:00
[Fix #215] Set Terminal title on Mac OS X 10.8
This commit is contained in:
parent
bede1a2a71
commit
060f34c7e5
@ -82,14 +82,14 @@ function set-title-precmd {
|
|||||||
if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]]; then
|
if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]]; 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
|
fi
|
||||||
|
|
||||||
set-window-title "${(%):-%~}"
|
set-window-title "${(%):-%~}"
|
||||||
for kind in tab screen; do
|
for kind in tab screen; do
|
||||||
# Left-truncate the current working directory to 15 characters.
|
# Left-truncate the current working directory to 15 characters.
|
||||||
set-${kind}-title "${(%):-%15<...<%~%<<}"
|
set-${kind}-title "${(%):-%15<...<%~%<<}"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
add-zsh-hook precmd set-title-precmd
|
add-zsh-hook precmd set-title-precmd
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user