Created
September 4, 2024 19:17
-
-
Save j1cs/247f80d9a6e5d818339f8134c7b870f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this to your .zprofile or .zshrc | |
case $TERM in | |
xterm*|rxvt*) | |
precmd() { | |
# Use the appropriate shell variables to get the username and hostname | |
local user="%n" # %n is the username | |
local host="%m" # %m is the hostname up to the first '.' | |
print -Pn "\e]0;${user}@${host}\a" | |
} | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment