Add zsh user@host output to terminal title

This commit is contained in:
Trysdyn Black 2020-07-20 11:49:30 -07:00
parent c952c9ecbf
commit 00d97f8227

6
.zshrc
View file

@ -1,3 +1,5 @@
export LANG=en_US.UTF-8
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
SESSION_TYPE=ssh
else
@ -13,6 +15,10 @@ fi
source ~/.p10k/powerlevel10k.zsh-theme
# Print user@host into title so terminal tabs are correct
# Despite being called precmd() this executes after process exits, before prompt
precmd() { echo -ne "\033]0;${USER}@${HOST}\007" }
# These are pretty safe to assume exist
export PATH=~/bin:$PATH
export EDITOR=vim