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
9e9831fc
Unverified
Commit
9e9831fc
authored
Feb 04, 2022
by
Harris Miller
Committed by
Marc Cornellà
Feb 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(bureau): fix never `CLEAN` git status (#10656)
Closes #10656
parent
2d3bae96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
bureau.zsh-theme
themes/bureau.zsh-theme
+11
-9
No files found.
themes/bureau.zsh-theme
View file @
9e9831fc
...
...
@@ -25,20 +25,21 @@ bureau_git_branch () {
bureau_git_status() {
local result gitstatus
gitstatus="$(command git status --porcelain -b 2>/dev/null)"
# check status of files
gitstatus=$(command git status --porcelain -b 2> /dev/null)
if [[ -n "$git
statu
s" ]]; then
if $(echo "$git
statu
s" | command grep -q '^[AMRD]. '); then
local gitfiles="$(tail -n +2 <<< "$gitstatus")"
if [[ -n "$git
file
s" ]]; then
if $(echo "$git
file
s" | command grep -q '^[AMRD]. '); then
result+="$ZSH_THEME_GIT_PROMPT_STAGED"
fi
if $(echo "$git
statu
s" | command grep -q '^.[MTD] '); then
if $(echo "$git
file
s" | command grep -q '^.[MTD] '); then
result+="$ZSH_THEME_GIT_PROMPT_UNSTAGED"
fi
if $(echo "$git
statu
s" | command grep -q -E '^\?\? '); then
if $(echo "$git
file
s" | command grep -q -E '^\?\? '); then
result+="$ZSH_THEME_GIT_PROMPT_UNTRACKED"
fi
if $(echo "$git
statu
s" | command grep -q '^UU '); then
if $(echo "$git
file
s" | command grep -q '^UU '); then
result+="$ZSH_THEME_GIT_PROMPT_UNMERGED"
fi
else
...
...
@@ -46,13 +47,14 @@ bureau_git_status() {
fi
# check status of local repository
if $(echo "$gitstatus" | command grep -q '^## .*ahead'); then
local gitbranch="$(head -n 1 <<< "$gitstatus")"
if $(echo "$gitbranch" | command grep -q '^## .*ahead'); then
result+="$ZSH_THEME_GIT_PROMPT_AHEAD"
fi
if $(echo "$git
status
" | command grep -q '^## .*behind'); then
if $(echo "$git
branch
" | command grep -q '^## .*behind'); then
result+="$ZSH_THEME_GIT_PROMPT_BEHIND"
fi
if $(echo "$git
status
" | command grep -q '^## .*diverged'); then
if $(echo "$git
branch
" | command grep -q '^## .*diverged'); then
result+="$ZSH_THEME_GIT_PROMPT_DIVERGED"
fi
...
...
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