Skip to content
This repository
Browse code

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...
commit 5128669a76a744883ad51df7682577e6654418e1 1 parent 5eb3ec6
Yohann Bianchi authored March 26, 2013

Showing 1 changed file with 2 additions and 3 deletions. Show diff stats Hide diff stats

  1. 5  themes/agnoster.zsh-theme
5  themes/agnoster.zsh-theme
@@ -87,12 +87,11 @@ prompt_hg() {
87 87
 	local rev status
88 88
 	if $(hg id >/dev/null 2>&1); then
89 89
 		if $(hg prompt >/dev/null 2>&1); then
90  
-			st=$(hg prompt {status})
91  
-			if [[ $st = "?" ]]; then
  90
+			if [[ $(hg prompt "{status|unknown}") = "?" ]]; then
92 91
 				# if files are not added
93 92
 				prompt_segment red white
94 93
 				st='±'
95  
-			elif [[ -n $st ]]; then
  94
+			elif [[ -n $(hg prompt "{status|modified}") ]]; then
96 95
 				# if any modification
97 96
 				prompt_segment yellow black
98 97
 				st='±'

0 notes on commit 5128669

Please sign in to comment.
Something went wrong with that request. Please try again.