summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Keller <tjkeller.xyz>2025-01-12 16:25:46 -0600
committerTim Keller <tjkeller.xyz>2025-01-12 16:25:46 -0600
commit1a033d7fb3835ee2f9fc1b74175f8cd0fec55cfa (patch)
treef26f10d39909df2e484cd99c54d5b6ece91f613c
parentb6e52cce13dfbdbcdb0ceca8f4a5e8a760456e92 (diff)
downloadzsh-1a033d7fb3835ee2f9fc1b74175f8cd0fec55cfa.tar.xz
zsh-1a033d7fb3835ee2f9fc1b74175f8cd0fec55cfa.zip
update terminal emulators cwd in precmd
-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
}