From: Michael J Gruber Date: Wed, 09 Jun 2010 21:03:54 GMT Subject: Re: [RFC/PATCHv2] bash completion: Support "divergence from upstream" warnings in __git_ps1 Message-ID: <4C1001BA.5010206@drmicha.warpmail.net> In-Reply-To: <4C0FFE06.60903@drmicha.warpmail.net> 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