Last active
August 29, 2016 08:44
-
-
Save don-smith/97b21e6c17b10160660ede41d2d4e1d7 to your computer and use it in GitHub Desktop.
A thoughtful ZSH theme
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
# ZSH Theme inspired by the bira theme | |
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" | |
if [[ $UID -eq 0 ]]; then | |
local user_host='☮ %{$terminfo[bold]$fg[red]%}%n@%m%{$reset_color%}' | |
else | |
local user_host='☯' | |
fi | |
local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}' | |
local rvm_ruby='' | |
if which rvm-prompt &> /dev/null; then | |
rvm_ruby='%{$fg[red]%}‹$(rvm-prompt i v g)›%{$reset_color%}' | |
else | |
if which rbenv &> /dev/null; then | |
rvm_ruby='%{$fg[red]%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$reset_color%}' | |
fi | |
fi | |
local git_branch='$(git_prompt_info)%{$reset_color%}' | |
PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch} | |
╰─%B$%b " | |
RPS1="${return_code}" | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment