Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
7cc1eab6
Commit
7cc1eab6
authored
Mar 30, 2016
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2752 from isqua/bureau_theme_fix
Fix checkmark for clean repo in bureau theme
parents
c74681a1
e2bf7cb3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
27 deletions
+31
-27
bureau.zsh-theme
themes/bureau.zsh-theme
+31
-27
No files found.
themes/bureau.zsh-theme
View file @
7cc1eab6
...
@@ -23,32 +23,36 @@ bureau_git_branch () {
...
@@ -23,32 +23,36 @@ bureau_git_branch () {
}
}
bureau_git_status () {
bureau_git_status () {
_INDEX=$(command git status --porcelain -b 2> /dev/null)
_STATUS=""
_STATUS=""
if $(echo "$_INDEX" | grep '^[AMRD]. ' &> /dev/null); then
if [[ $(command git status --short 2> /dev/null) != "" ]]; then
_INDEX=$(command git status --porcelain -b 2> /dev/null)
if $(echo "$_INDEX" | command grep '^[AMRD]. ' &> /dev/null); then
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STAGED"
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STAGED"
fi
fi
if $(echo "$_INDEX" |
grep '^.[MTD] ' &> /dev/null); then
if $(echo "$_INDEX" | command
grep '^.[MTD] ' &> /dev/null); then
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"
fi
fi
if $(echo "$_INDEX" | command grep -E '^\?\? ' &> /dev/null); then
if $(echo "$_INDEX" | command grep -E '^\?\? ' &> /dev/null); then
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED"
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED"
fi
fi
if $(echo "$_INDEX" |
grep '^UU ' &> /dev/null); then
if $(echo "$_INDEX" | command
grep '^UU ' &> /dev/null); then
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED"
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED"
fi
fi
if $(command git rev-parse --verify refs/stash >/dev/null 2>&1); then
if $(command git rev-parse --verify refs/stash >/dev/null 2>&1); then
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STASHED"
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STASHED"
fi
fi
if $(echo "$_INDEX" |
grep '^## .*ahead' &> /dev/null); then
if $(echo "$_INDEX" | command
grep '^## .*ahead' &> /dev/null); then
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_AHEAD"
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_AHEAD"
fi
fi
if $(echo "$_INDEX" |
grep '^## .*behind' &> /dev/null); then
if $(echo "$_INDEX" | command
grep '^## .*behind' &> /dev/null); then
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_BEHIND"
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_BEHIND"
fi
fi
if $(echo "$_INDEX" |
grep '^## .*diverged' &> /dev/null); then
if $(echo "$_INDEX" | command
grep '^## .*diverged' &> /dev/null); then
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_DIVERGED"
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_DIVERGED"
fi
fi
else
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_CLEAN"
fi
echo $_STATUS
echo $_STATUS
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment