mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-30 02:44:42 +01:00
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:
parent
1b5503a3ee
commit
cf1b417a82
1 changed files with 2 additions and 1 deletions
|
|
@ -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%}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue