mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Added moonglum.zsh-theme
This commit is contained in:
parent
1120f97305
commit
08eedfea07
1 changed files with 19 additions and 0 deletions
19
themes/moonglum.zsh-theme
Normal file
19
themes/moonglum.zsh-theme
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
local smiley="%(?,%{$fg[green]%}☺%{$reset_color%},%{$fg[red]%}☹%{$reset_color%}) "
|
||||||
|
|
||||||
|
function git-status() {
|
||||||
|
if [[ `git rev-parse --git-dir 2>/dev/null` != '' ]]; then
|
||||||
|
# We are in a git repo
|
||||||
|
|
||||||
|
local gitdirty=""
|
||||||
|
if [[ `git ls-files -m` != "" ]]; then
|
||||||
|
# There are changes to files
|
||||||
|
|
||||||
|
gitdirty="%{$fg[red]%} ✗%{$reset_color%}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ' @' `git symbolic-ref -q HEAD | sed 's/refs\/heads\///'` $gitdirty
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
PROMPT='${smiley}'
|
||||||
|
RPROMPT='%~$(git-status)'
|
||||||
Loading…
Add table
Add a link
Reference in a new issue