Mercurial > dotfiles.old
changeset 125:18db7404aaf2
Improve zsh prompt
author | zegervdv <zegervdv@me.com> |
---|---|
date | Tue, 30 Sep 2014 09:36:17 +0200 |
parents | 474a8dbb1ac5 |
children | d0cd259345f3 |
files | oh-my-zsh/themes/custom.zsh-theme |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/oh-my-zsh/themes/custom.zsh-theme Mon Sep 29 21:42:23 2014 +0200 +++ b/oh-my-zsh/themes/custom.zsh-theme Tue Sep 30 09:36:17 2014 +0200 @@ -13,7 +13,10 @@ git=0 fi -PROMPT='%{$fg[cyan]%}%n@%m%{$reset_color%} in %{$fg[yellow]%}%~%b%{$reset_color%} +local my_prompt_name='%n' +[[ "$SSH_CONNECTION" != '' ]] && my_prompt_name='%n@%m' + +PROMPT='%{$fg[cyan]%}$my_prompt_name%{$reset_color%} in %{$fg[yellow]%}%~%b%{$reset_color%} %{$reset_color%}%(?.%{$fg[white]%}.%{$fg[red]%})→ %{$reset_color%}' @@ -30,3 +33,4 @@ ZSH_THEME_GIT_PROMPT_CLEAN="" ZSH_THEME_GIT_PROMPT_DIRTY="%{$reset_color%}" ZSH_THEME_GIT_PROMPT_SUFFIX="$my_gray%{$reset_color%}" +