Pierre Habouzit schrieb:test "x$TERM" != "xdumb" && tput hpa 60 >/dev/null 2>&1 && tput setaf 1 >/dev/null 2>&1 && color=t BTW, doesn't tput fail if stdout/stderr is not a terminal, like above? What if tput is not available, like on Windows? How about this (at the end of the file, so it can obey --no-color): if test "$color"; then say_color () { test "$1" != '-1' && tput setaf "$1" shift echo "* $*" tput op } else say_color() { shift echo "* $*" } fi color=; shift ;; -- Hannes "We don't need no double negation" - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Jeff Garzik | Re: fallocate-implementation-on-i86-x86_64-and-powerpc.patch |
git: | |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Arjan van de Ven | Re: [GIT]: Networking |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Natalie Protasevich | [BUG] New Kernel Bugs |
