Permalink
Browse files

IMPROVED: untracked file status has priority over modified (ie: if yo…

…u have both modified and untracked files, your prompt will be red indicating the presence of untracked files)
  • Loading branch information...
1 parent 5eb3ec6 commit 5128669a76a744883ad51df7682577e6654418e1 @nstCactus committed Mar 26, 2013
Showing with 2 additions and 3 deletions.
  1. +2 −3 themes/agnoster.zsh-theme
@@ -87,12 +87,11 @@ prompt_hg() {
local rev status
if $(hg id >/dev/null 2>&1); then
if $(hg prompt >/dev/null 2>&1); then
- st=$(hg prompt {status})
- if [[ $st = "?" ]]; then
+ if [[ $(hg prompt "{status|unknown}") = "?" ]]; then
# if files are not added
prompt_segment red white
st='±'
- elif [[ -n $st ]]; then
+ elif [[ -n $(hg prompt "{status|modified}") ]]; then
# if any modification
prompt_segment yellow black
st='±'

0 comments on commit 5128669

Please sign in to comment.