From 1a033d7fb3835ee2f9fc1b74175f8cd0fec55cfa Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Sun, 12 Jan 2025 16:25:46 -0600 Subject: update terminal emulators cwd in precmd --- zscripts/terminalname.zsh | 9 +++------ 1 file 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 } -- cgit v1.2.3