From cf1b417a8231c474983d624083f82e50d1880b17 Mon Sep 17 00:00:00 2001 From: John Matczak <50644033+cidrmill@users.noreply.github.com> Date: Sat, 20 Apr 2024 06:04:59 +0000 Subject: [PATCH] fix(theme/fishy): make the prompt more fish-like Modifies the prompt in fishy.zsh-theme to display the hostname in a different color (yellow) when the user is connected via SSH. Additionally, the username is now displayed in a separate color block, improving readability and making it easier to distinguish different components of the prompt. --- themes/fishy.zsh-theme | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/fishy.zsh-theme b/themes/fishy.zsh-theme index 2b8d559e5..3b975c8f4 100644 --- a/themes/fishy.zsh-theme +++ b/themes/fishy.zsh-theme @@ -16,7 +16,8 @@ _fishy_collapsed_wd() { } local user_color='green'; [ $UID -eq 0 ] && user_color='red' -PROMPT='%n@%m %{$fg[$user_color]%}$(_fishy_collapsed_wd)%{$reset_color%}%(!.#.>) ' +local host_color='white'; [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] && host_color='yellow' +PROMPT='%{$fg[$user_color]%}%n%{$reset_color%}@%{$fg[$host_color]%}%m %{$fg[$user_color]%}$(_fishy_collapsed_wd)%{$reset_color%}%(!.#.>) ' PROMPT2='%{$fg[red]%}\ %{$reset_color%}' local return_status="%{$fg_bold[red]%}%(?..%?)%{$reset_color%}"