mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
simplyblue: display the hostname when the computer is accessed via ssh
This commit is contained in:
parent
8587b1bdae
commit
4856d16e33
1 changed files with 7 additions and 1 deletions
|
|
@ -1,6 +1,12 @@
|
|||
PROMPT='%{$fg_bold[blue]%}%~ $(git_prompt_info)%{$fg_bold[yellow]%}➜ %{$reset_color%}'
|
||||
PROMPT='$(ssh_connection)%{$fg_bold[blue]%}%~ $(git_prompt_info)%{$fg_bold[yellow]%}➜ %{$reset_color%}'
|
||||
RPROMPT='%{$fg_bold[blue]%}%T%{$reset_color%}'
|
||||
|
||||
function ssh_connection() {
|
||||
if [[ -n $SSH_CONNECTION ]]; then
|
||||
echo "%{$fg_bold[red]%}$(hostname) "
|
||||
fi
|
||||
}
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue