diff options
author | Tim Keller <tjkeller.xyz> | 2025-01-12 16:25:46 -0600 |
---|---|---|
committer | Tim Keller <tjkeller.xyz> | 2025-01-12 16:25:46 -0600 |
commit | 1a033d7fb3835ee2f9fc1b74175f8cd0fec55cfa (patch) | |
tree | f26f10d39909df2e484cd99c54d5b6ece91f613c /zscripts/terminalname.zsh | |
parent | b6e52cce13dfbdbcdb0ceca8f4a5e8a760456e92 (diff) | |
download | zsh-1a033d7fb3835ee2f9fc1b74175f8cd0fec55cfa.tar.xz zsh-1a033d7fb3835ee2f9fc1b74175f8cd0fec55cfa.zip |
update terminal emulators cwd in precmd
Diffstat (limited to 'zscripts/terminalname.zsh')
-rwxr-xr-x | zscripts/terminalname.zsh | 9 |
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 } |