Created
January 4, 2016 20:27
-
-
Save oliverhr/66066f228db2bdfad1b0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# --------------------------------------- | |
# geekster.zsh-theme | |
# https://github.com/oliverhr | |
# --------------------------------------- | |
local return_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)%{$reset_color%}" | |
function get_pwd(){ | |
git_root=$PWD | |
while [[ $git_root != / && ! -e $git_root/.git ]]; do | |
git_root=$git_root:h | |
done | |
if [[ $git_root = / ]]; then | |
unset git_root | |
prompt_short_dir=%~ | |
else | |
parent=${git_root%\/*} | |
prompt_short_dir=${PWD#$parent/} | |
fi | |
echo $prompt_short_dir | |
} | |
PROMPT='$return_status %{$reset_color%}%{$fg[white]%}$(get_pwd) $(git_prompt_info)%{$reset_color%} | |
$ ' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[cyan]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗" | |
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔" | |
RPROMPT='$(git_prompt_status)%{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚" | |
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ⚑" | |
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%}✖" | |
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[cyan]%} ↺" | |
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[white]%} ⇣" | |
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[yellow]%} ✭" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment