Subject: Re: [RFC/PATCHv2] bash completion: Support "divergence from upstream" warnings in __git_ps1

From: Michael J Gruber <[email-masked]>
Date: Wed, 09 Jun 2010 23:03:54 +0200

Michael J Gruber venit, vidit, dixit 09.06.2010 22:48:

> 					case "$p" in
> 						\<*\>*|\>*\<* ) p="+"$(echo "$p"|grep ">"|wc -l)"-"$(echo
> "$p"|grep "<"|wc -l)  ;;
> 						*\<*          ) p="-"$(echo "$p"|grep "<"|wc -l)  ;;
> 						*\>*          ) p="+"$(echo "$p"|grep ">"|wc -l)  ;;
> 

...make this

grep -Fc ">"

etc. rather than

grep ">"|wc -l

etc. of course. Sorry for the bash-spam :)

Michael