0
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-19 04:01:21 +02:00

feat(fishy): add color to username (#12369)

This commit is contained in:
John Matczak 2024-04-23 01:54:00 -07:00 committed by GitHub
parent 67581c53c6
commit ee69c14beb
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' 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%}' PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
local return_status="%{$fg_bold[red]%}%(?..%?)%{$reset_color%}" local return_status="%{$fg_bold[red]%}%(?..%?)%{$reset_color%}"