|
|
|
@ -82,14 +82,14 @@ function set-title-precmd {
@@ -82,14 +82,14 @@ function set-title-precmd {
|
|
|
|
|
if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]]; then |
|
|
|
|
# Set the current working directory in Apple Terminal. |
|
|
|
|
printf '\e]7;%s\a' "file://$HOST${PWD// /%20}" |
|
|
|
|
else |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
set-window-title "${(%):-%~}" |
|
|
|
|
for kind in tab screen; do |
|
|
|
|
# Left-truncate the current working directory to 15 characters. |
|
|
|
|
set-${kind}-title "${(%):-%15<...<%~%<<}" |
|
|
|
|
done |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
|
} |
|
|
|
|
add-zsh-hook precmd set-title-precmd |
|
|
|
|
|
|
|
|
|