[zsh] Set a file URL in the Apple Terminal title
This commit is contained in:
parent
694e038b63
commit
932aac1928
1 changed files with 5 additions and 2 deletions
|
@ -132,10 +132,13 @@ function set_xterm_title
|
||||||
|
|
||||||
# Set xterm and screen titles
|
# Set xterm and screen titles
|
||||||
if [[ -n "$DISPLAY" || -n "$TERM_PROGRAM" ]]; then
|
if [[ -n "$DISPLAY" || -n "$TERM_PROGRAM" ]]; then
|
||||||
title+="%n@%m"
|
print -Pn "\e]2;%n@%m\a"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print -Pn "\e]2;${title}\a"
|
# For Apple Terminal.app, add a link to the current directory.
|
||||||
|
if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]]; then
|
||||||
|
print -Pn "\e]7;file://%d\a"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue