Skip to content

Instantly share code, notes, and snippets.

@prinsss
Last active April 20, 2018 18:37
Show Gist options
  • Save prinsss/ef48c6e91f9e941ad12284ae51e24ccd to your computer and use it in GitHub Desktop.
Save prinsss/ef48c6e91f9e941ad12284ae51e24ccd to your computer and use it in GitHub Desktop.
Modified Zsh theme, Robby Russell Makaizou. Added user@hostname prompt which is convenient for VPS management.
# For local shell, prompt is lik this
# ➜ blessing-skin-server git:(master)$
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}%{$reset_color%}%{$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]%})"
# For remote vps, prompt is lik this
# root@prinzeugen ~ $
PROMPT='%{$fg[green]%}%p%n@%M %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}%{$reset_color%}%{$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