From 00d97f8227e5fb9265e2fea3224e0a967c738da9 Mon Sep 17 00:00:00 2001 From: Trysdyn Black Date: Mon, 20 Jul 2020 11:49:30 -0700 Subject: [PATCH] Add zsh user@host output to terminal title --- .zshrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.zshrc b/.zshrc index 56d20e6..9427149 100644 --- a/.zshrc +++ b/.zshrc @@ -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