- Have oh-my-zsh installed in your machine
- Copy the
sgobotta.zsh-themefile in acustom/themesdirectory in the~/.oh-my-zshrepository - Paste this line in the very beginning of your
~/.zshrcfile:ZSH_THEME=sgobotta
| # Forked from the robbyrussel theme | |
| function virtualenv_prompt_info { | |
| [[ -n ${VIRTUAL_ENV} ]] || return | |
| echo "${ZSH_THEME_VIRTUALENV_PREFIX:=[}${VIRTUAL_ENV:t}${ZSH_THEME_VIRTUALENV_SUFFIX:=]}" | |
| } | |
| local virtualenv_info='$(virtualenv_prompt_info)' | |
| PROMPT="${virtualenv_info}" | |
| PROMPT+='%{$fg_bold[grey]%}[%{$reset_color%}%{$fg[white]%}%D{%y/%m/%d} %D{%H:%M:%S}%{$fg_bold[grey]%}]' | |
| PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)' | |
| PROMPT+=$'\n' | |
| PROMPT+="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )%{$reset_color%}" | |
| 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]%})" | |
| export VIRTUAL_ENV_DISABLE_PROMPT=1 | |
| ZSH_THEME_VIRTUALENV_PREFIX="${fg[yellow]}(" | |
| ZSH_THEME_VIRTUALENV_SUFFIX=")%{$reset_color%}" |