[arch-projects] [mkinitcpio][PATCH 21/26] lsinitcpio: disable color when stdout isn't a tty
Dan McGee
dpmcgee at gmail.com
Mon Sep 26 21:57:40 EDT 2011
On Mon, Sep 26, 2011 at 8:22 PM, Dave Reisner <d at falconindy.com> wrote:
> Signed-off-by: Dave Reisner <dreisner at archlinux.org>
Why were we using stderr before? Did something else change?
> ---
> lsinitcpio | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/lsinitcpio b/lsinitcpio
> index ca2b224..95c0500 100755
> --- a/lsinitcpio
> +++ b/lsinitcpio
> @@ -62,7 +62,7 @@ shift $(( OPTIND - 1 ))
>
> declare image=$1
>
> -if [[ -t 2 ]] && (( color )); then
> +if [[ -t 1 ]] && (( color )); then
> # prefer terminal safe colored and bold text when tput is supported
> if tput setaf 0 &>/dev/null; then
> NC="$(tput sgr0)"
> --
> 1.7.6.4
>
>
More information about the arch-projects
mailing list