summaryrefslogtreecommitdiff
path: root/zscripts/terminalname.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zscripts/terminalname.zsh')
-rwxr-xr-xzscripts/terminalname.zsh9
1 files changed, 3 insertions, 6 deletions
diff --git a/zscripts/terminalname.zsh b/zscripts/terminalname.zsh
index 6e55d22..e4a4072 100755
--- a/zscripts/terminalname.zsh
+++ b/zscripts/terminalname.zsh
@@ -1,8 +1,5 @@
-function xtitle () {
- builtin print -n -- "\e]0;$@\a"
-}
-
-# Updates the window title whenever a command is run
+# Runs whenever a command is ran
function precmd () {
- xtitle "$(print -P ${USER}@${HOST} %~)"
+ builtin print -Pn "\e]0;${USER}@${HOST} %~\a" # Update window title
+ builtin print -Pn "\e]7;file://${PWD}\a" # Update terminal emulators's cwd
}