Add zsh user@host output to terminal title
This commit is contained in:
parent
c952c9ecbf
commit
00d97f8227
1 changed files with 6 additions and 0 deletions
6
.zshrc
6
.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
|
||||
|
|
Loading…
Add table
Reference in a new issue