autoconf-patches
[Top][All Lists]
Advanced

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

Re: bug#6427: Autotest: enable colored test results.


From: Eric Blake
Subject: Re: bug#6427: Autotest: enable colored test results.
Date: Thu, 17 Jun 2010 13:54:24 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b2pre Mnenhy/0.8.2 Thunderbird/3.0.4

On 06/17/2010 01:06 PM, Ralf Wildenhues wrote:
> * Pádraig Brady wrote on Tue, Jun 15, 2010 at 11:50:01AM CEST:
>> On 14/06/10 21:23, Eric Blake wrote:
>>> ls --color => color
>>> ls --color=yes => color
>>> ls --color=auto => plain
>>> ls --color=always => color
>>> grep --color => plain
>>> grep --color=yes => color
>>> grep --color=auto => plain
>>> grep --color=always => color
>>>
>>> That is, ls --color implies ls --color=always, while grep --color
>>> implies grep --color=always.
>>
>> grep --color=auto you mean.

Yep, sorry for my typo.

> I don't know either.  However, I also think Autotest need not wait for
> standardization in order to gain color support.  We can still fix the
> details later.

True enough.

> 
>> ls has these synonyms:
>>
>>   "always", "yes", "force",
>>   "never", "no", "none",
>>   "auto", "tty", "if-tty", NULL
>>
>> We only document the first column which is a good thing.
> 
> I agree, and implemented that in the updated patch.
> 
> The patch below has --color equal --color=always.  Since I'm less
> concerned about this detail than about the fact that the patch may not
> go in at all, I'm adding a second patch, to be squashed in with the
> first, if you prefer --color to be equal to --color=auto.
> 
> OK to commit 1 or 1+2?

For now, let's match ls (--color equals --color=always, patch 1 only),
and you are free to push after fixing one nit:

> +    --color )
> +     at_color=always
> +     ;;
> +    --color=* )
> +     case $at_optarg in
> +     no | never | none) at_color=never ;;
> +     auto | tty | if-tty) at_color=auto ;;
> +     always | yes | force) at_color=always ;;
> +     esac

Let's add a *) option and cause a fatal error if we don't recognize the
argument given to the --color option.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]