zshrc_vcsinfo: Fix grep usage
authorMikael Berthe <mikael@lilotux.net>
Mon, 19 Jun 2023 17:45:08 +0200
changeset 54 c8054d1073d3
parent 53 4767c5a8b1f9
child 55 8b0752a1fe63
zshrc_vcsinfo: Fix grep usage
misc/zshrc_vcsinfo
--- a/misc/zshrc_vcsinfo	Wed Nov 10 10:45:00 2021 +0100
+++ b/misc/zshrc_vcsinfo	Mon Jun 19 17:45:08 2023 +0200
@@ -111,7 +111,7 @@
 		# If instead you want to show the marker only if there are untracked
 		# files in $PWD, use:
 		#[[ -n $(git ls-files --others --exclude-standard) ]] ; then
-		local nb_untracked=$(git status --porcelain | grep "\? \?" | wc -l)
+		local nb_untracked=$(git status --porcelain | grep "? ?" | wc -l)
 		local nb_up=$(git status --porcelain | grep "M" | wc -l)
 		hook_com[staged]+="%{${reset_color}%}$nb_untracked%{$fg[red]%}N %{${reset_color}%}$nb_up"
 	fi