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.
This commit is contained in:
John Matczak 2024-04-20 06:04:59 +00:00 committed by GitHub
commit cf1b417a82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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%}"