Skip to content

Instantly share code, notes, and snippets.

@serverwentdown
Created December 3, 2014 07:27
Show Gist options
  • Save serverwentdown/d1a98ec0027c5a379fc8 to your computer and use it in GitHub Desktop.
Save serverwentdown/d1a98ec0027c5a379fc8 to your computer and use it in GitHub Desktop.
robbyrussell.zsh-theme to not get confused between SSH and local shells
if [[ -n $SSH_CONNECTION ]]; then
local ret_status="%(?:%{$fg_bold[yellow]%}➜ :%{$fg_bold[red]%}➜ %s)"
else
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
fi
PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment