mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
New theme chrpes - less colors, shows ruby version and git info subtly on the right side
This commit is contained in:
parent
f4944d5a95
commit
01dcff415e
1 changed files with 22 additions and 0 deletions
22
themes/chrpes.zsh-theme
Normal file
22
themes/chrpes.zsh-theme
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[grey]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[grey]%}✗"
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%}?"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[grey]%}✓"
|
||||||
|
|
||||||
|
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
|
||||||
|
git_custom_status() {
|
||||||
|
local cb=$(current_branch)
|
||||||
|
if [ -n "$cb" ]; then
|
||||||
|
echo "$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)%B$(parse_git_dirty)%b$ZSH_THEME_GIT_PROMPT_SUFFIX "
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
rvm_status() {
|
||||||
|
if [[ -s ~/.rvm/scripts/rvm ]] ; then
|
||||||
|
echo "%{$fg[grey]%}`~/.rvm/bin/rvm-prompt`%{$reset_color%}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
PROMPT='%{$fg[yellow]%}%~% %(?.%{$fg[green]%}.%{$fg[red]%})%B ➜ %b'
|
||||||
|
RPS1=' $(git_custom_status)$(rvm_status) $EPS1'
|
||||||
Loading…
Add table
Add a link
Reference in a new issue