Last active
December 20, 2015 01:19
-
-
Save pichfl/6048392 to your computer and use it in GitHub Desktop.
My personal zsh theme for oh my zsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This theme is a small multiline modification of the fantastic robbyrussell.zsh-theme. | |
# Fix rendering errors when using multibyte characters | |
export LC_ALL=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
prompt_context() { | |
local user=`whoami` | |
if [[ -n "$SSH_CLIENT" ]]; then | |
echo "%{$fg_bold[blue]%}%n$fg_bold[red]%}@%m%{$reset_color%}" | |
else | |
echo "%{$fg_bold[blue]%}%n@%m%{$reset_color%}" | |
fi | |
} | |
prompt_arrow() { | |
local user=`whoami` | |
if [[ -n "$SSH_CLIENT" ]]; then | |
echo "%{$fg_bold[red]%}➜%{$reset_color%} " | |
else | |
echo "%{$fg_bold[blue]%}➜%{$reset_color%} " | |
fi | |
} | |
promt_path() { | |
echo %{$fg_bold[cyan]%}%~%{$reset_color%} | |
} | |
promt_echo_git() { | |
echo %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%} | |
} | |
PROMPT=' | |
$(prompt_context) $(promt_path) $(promt_echo_git) | |
$(prompt_arrow)' | |
ZSH_THEME_GIT_PROMPT_PREFIX="±(%{$fg[magenta]%}" | |
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]%}) %{$fg[green]%}✔︎%{$reset_color%}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A small preview