From 07f58d36f7f37724f0dc1d460361219e25db48f8 Mon Sep 17 00:00:00 2001 From: Andrew Lorimer Date: Thu, 25 Sep 2025 23:00:38 +1000 Subject: [PATCH] [zsh] fix prompt for SSH sessions --- zsh/.oh-my-zsh/custom/themes/custom.zsh-theme | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/zsh/.oh-my-zsh/custom/themes/custom.zsh-theme b/zsh/.oh-my-zsh/custom/themes/custom.zsh-theme index ac0f295..16ce024 100644 --- a/zsh/.oh-my-zsh/custom/themes/custom.zsh-theme +++ b/zsh/.oh-my-zsh/custom/themes/custom.zsh-theme @@ -24,7 +24,7 @@ autoload -Uz vcs_info # Use 256 colours if available if [[ "${terminfo[colors]}" -ge 256 ]]; then - color0="%F{69}" # blue context/angle bracket + color0="%F{107}" # blue context/angle bracket color1="%F{256}" # white pwd text color2="%F{245}" # grey git branch text color3="%F{167}" # red error/untracked @@ -38,6 +38,7 @@ else # Fall back to standard ANSI names color4="%F{yellow}" color5="%F{green}" fi +reset="%{%f%}" FMT_VCS_STATUS="%{$color2%}%b%u%c%{%f%} " @@ -62,7 +63,8 @@ add-zsh-hook precmd vcs_info # Context (user@host) if [[ "$SSH_CLIENT" ]]; then - context="%{$color0%}%n@%m " + #context="%{$color0%}%n@%m " + context='%{$color0%}%n@%m%f ' fi # Check for suspended processes @@ -70,4 +72,4 @@ checkjobs() { [[ $(jobs -l | wc -l) -gt 0 ]] && echo "%{$color4%}● " } -PROMPT=$'$(checkjobs)%{$symbols%}%{$context%}%{%f%}%~%{%f%} ${vcs_info_msg_0_/master/} %(?.%{$color0%}.%{$color3%})%(!.#.❯)%{%f%} ' +PROMPT='%1(j.'$color4'● .)'$context'%~ ${vcs_info_msg_0_//master/} %(?.'$color0'.'$color3')%(!.#.❯)%f ' -- 2.49.0