Skip to content

Commit

Permalink
show git stash count
Browse files Browse the repository at this point in the history
  • Loading branch information
thonixx committed Jul 1, 2019
1 parent 0d6bd6b commit a29dbc0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion zsh/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,12 @@ function precmd() {
# calculate files untracked
local count="$(echo "$gitstatus" 2> /dev/null | egrep "^\s{0,}\?\?" | wc -l | tr -d " ")"
[[ "$count" -gt 0 ]] && gitline="$gitline %{$fg[white]%}⁙ ${count}"
# some symbols/characters for git line:  # ⁇ ⁂ ● ⚛ ⁙ ᛭ ⚫ ⚪ ✓ ×    

# calculate stash list
local count="$(git stash list | wc -l)"
[[ "$count" -gt 0 ]] && gitline="$gitline %{$(tput bold)$fg[magenta]%}⁙ ${count}${reset_color}"

# some symbols/characters for git line:  # ⁇ ⁂ ● ⚛ ⁙ ᛭ ⚫ ⚪ ✓ ×    ¤
# reset colors
local gitline="${gitline}%{$reset_color%}"
else
Expand Down

0 comments on commit a29dbc0

Please sign in to comment.