From 9951ecf7a4861e7f80c63692ec946e08763740f0 Mon Sep 17 00:00:00 2001 From: Fabian Ising Date: Mon, 19 Oct 2026 11:47:14 +0200 Subject: [PATCH] [ZSH] Pin user@host title in sudo/su shells too Co-Authored-By: Claude Opus 5.5 --- zsh/lib/interactive.zsh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/zsh/lib/interactive.zsh b/zsh/lib/interactive.zsh index f0dc304..e6d0df2 100644 --- a/zsh/lib/interactive.zsh +++ b/zsh/lib/interactive.zsh @@ -109,9 +109,8 @@ zstyle :bracketed-paste-magic paste-init pasteinit zstyle :bracketed-paste-magic paste-finish pastefinish ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(bracketed-paste) -# Over ssh, pin the terminal title to user@host (no cwd, no running command): -# the local tmux labels ssh panes with it (see main's .tmux.conf). -if [[ -n $SSH_CONNECTION ]]; then - ZSH_THEME_TERM_TITLE_IDLE='%n@%m' - add-zsh-hook -d preexec omz_termsupport_preexec -fi +# Pin the terminal title to user@host (no cwd, no running command): the local +# tmux labels ssh panes with it (see main's .tmux.conf). Unconditional, as +# sudo -s/su drop $SSH_CONNECTION. +ZSH_THEME_TERM_TITLE_IDLE='%n@%m' +add-zsh-hook -d preexec omz_termsupport_preexec