Mercurial > dotfiles.old
diff oh-my-zsh/themes/custom.zsh-theme @ 125:18db7404aaf2
Improve zsh prompt
author | zegervdv <zegervdv@me.com> |
---|---|
date | Tue, 30 Sep 2014 09:36:17 +0200 |
parents | a25bdb562e43 |
children |
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%}" +