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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]