Created
June 5, 2018 17:00
-
-
Save mshaaban0/5bfd551d8788b3a2694523077ba9b210 to your computer and use it in GitHub Desktop.
Oh my zsh - Special theme
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
# The prompt | |
PROMPT=' $(_current_path)$(git_prompt_info) $(_arrow) ' | |
# The right-hand prompt | |
RPROMPT='$(_prompt_nvm)$(git_prompt_status)' | |
function _current_path() { | |
echo "%{$fg[magenta]%}%c%{$reset_color%}" | |
} | |
function _arrow() { | |
echo "%{$fg[magenta]%}>_%{$reset_color%}" | |
} | |
function _prompt_nvm() { | |
local node_version=$(node -v) | |
[[ -z "${node_version}" ]] || [[ ${node_version} = "none" ]] || [[ ${node_version} = "system" ]] && return | |
echo "%{$fg[green]%}\U2B22 ${node_version:1}%{$reset_color%}" | |
} | |
function _user_host() { | |
if [[ -n $SSH_CONNECTION ]]; then | |
me="%n@%m" | |
elif [[ $LOGNAME != $USER ]]; then | |
me="%n" | |
fi | |
if [[ -n $me ]]; then | |
echo "%{$fg[blue]%}$me%{$reset_color%}:" | |
fi | |
} | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%} %{$fg[yellow]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" | |
ZSH_THEME_GIT_PROMPT_RENAMED="" | |
ZSH_THEME_GIT_PROMPT_DELETED="" | |
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[yellow]%} ◒" | |
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg_bold[green]%} ✔" | |
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✘" | |
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg_bold[blue]%} §" | |
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_bold[cyan]%}⇡ " | |
ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg_bold[cyan]%}⇣ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment