Skip to content

Instantly share code, notes, and snippets.

@polster
Last active February 11, 2020 21:27
Show Gist options
  • Save polster/dc976d213937e1f7030172038c098fef to your computer and use it in GitHub Desktop.
Save polster/dc976d213937e1f7030172038c098fef to your computer and use it in GitHub Desktop.
oh-my-zsh Theme
  • Create the following file:
    vi ~/.oh-my-zsh/custom/themes/devtheme.zsh-theme
  • Add the following content and save
    local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
    PROMPT='${ret_status} %{$fg_bold[magenta]%}%n%{$reset_color%}%{$FG[146]%}@%{$reset_color%}%{$fg_bold[blue]%}%m%{$reset_color%}  %{$fg_bold[cyan]%}%~%{$reset_color%} $(git_prompt_info)'
    
    ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
    ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
    ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
    ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
  • Change the current theme in your ~/.zshrc config
    ZSH_THEME="devtheme"
  • Quit current terminal session or source .zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment