Re: [PATCH/RFC] test-lib: add support for colors without tput

2012-09-17 Thread Johannes Sixt
Am 14.09.2012 19:28, schrieb Johannes Sixt: > Am 14.09.2012 18:58, schrieb Erik Faye-Lund: >> tput () { >> case "$1" in >> bold) >> -echo -ne "\033[1m" ;; >> +printf "\033[1m" ;; >> setaf) >> -ec

Re: [msysGit] Re: [PATCH/RFC] test-lib: add support for colors without tput

2012-09-14 Thread Johannes Sixt
Am 14.09.2012 20:11, schrieb Erik Faye-Lund: > On Fri, Sep 14, 2012 at 7:28 PM, Johannes Sixt wrote: >> printf '\033[0;3%sm' "$2" ;; > > Is there a reason for %s rather than %d? It seem it only takes > integers,.. No reason. I just mechanically converted your original exp

Re: [msysGit] Re: [PATCH/RFC] test-lib: add support for colors without tput

2012-09-14 Thread Erik Faye-Lund
On Fri, Sep 14, 2012 at 7:28 PM, Johannes Sixt wrote: > Am 14.09.2012 18:58, schrieb Erik Faye-Lund: >> tput () { >> case "$1" in >> bold) >> - echo -ne "\033[1m" ;; >> + printf "\033[1m" ;; >> setaf) >> -

Re: [PATCH/RFC] test-lib: add support for colors without tput

2012-09-14 Thread Junio C Hamano
Erik Faye-Lund writes: >> Neither is which, no? > > Oooh, right. Thanks for noticing. So I guess I should try to run it > instead. From the POSIX spec,... If you assume POSIX.1, there is "type". $ type frotz ; echo $? frotz is /usr/games/frotz 0 $ type frobnitz ; echo $? ba

Re: [PATCH/RFC] test-lib: add support for colors without tput

2012-09-14 Thread Erik Faye-Lund
On Fri, Sep 14, 2012 at 7:44 PM, Jeff King wrote: > On Fri, Sep 14, 2012 at 06:41:45PM +0200, Erik Faye-Lund wrote: > >> diff --git a/t/test-lib.sh b/t/test-lib.sh >> index 78c4286..7d1b34b 100644 >> --- a/t/test-lib.sh >> +++ b/t/test-lib.sh >> @@ -129,6 +129,20 @@ export _x05 _x40 _z40 LF >> #

Re: [PATCH/RFC] test-lib: add support for colors without tput

2012-09-14 Thread Jeff King
On Fri, Sep 14, 2012 at 06:41:45PM +0200, Erik Faye-Lund wrote: > diff --git a/t/test-lib.sh b/t/test-lib.sh > index 78c4286..7d1b34b 100644 > --- a/t/test-lib.sh > +++ b/t/test-lib.sh > @@ -129,6 +129,20 @@ export _x05 _x40 _z40 LF > # This test checks if command xyzzy does the right thing... >

Re: [PATCH/RFC] test-lib: add support for colors without tput

2012-09-14 Thread Erik Faye-Lund
On Fri, Sep 14, 2012 at 7:30 PM, Junio C Hamano wrote: > Erik Faye-Lund writes: > >> On Fri, Sep 14, 2012 at 6:41 PM, Erik Faye-Lund wrote: >>> diff --git a/t/test-lib.sh b/t/test-lib.sh >>> index 78c4286..7d1b34b 100644 >>> --- a/t/test-lib.sh >>> +++ b/t/test-lib.sh >>> @@ -129,6 +129,20 @@ ex

Re: [msysGit] Re: [PATCH/RFC] test-lib: add support for colors without tput

2012-09-14 Thread Erik Faye-Lund
On Fri, Sep 14, 2012 at 7:28 PM, Johannes Sixt wrote: > Am 14.09.2012 18:58, schrieb Erik Faye-Lund: >> tput () { >> case "$1" in >> bold) >> - echo -ne "\033[1m" ;; >> + printf "\033[1m" ;; >> setaf) >> -

Re: [PATCH/RFC] test-lib: add support for colors without tput

2012-09-14 Thread Junio C Hamano
Erik Faye-Lund writes: > On Fri, Sep 14, 2012 at 6:41 PM, Erik Faye-Lund wrote: >> diff --git a/t/test-lib.sh b/t/test-lib.sh >> index 78c4286..7d1b34b 100644 >> --- a/t/test-lib.sh >> +++ b/t/test-lib.sh >> @@ -129,6 +129,20 @@ export _x05 _x40 _z40 LF >> # This test checks if command xyzzy do

Re: [msysGit] Re: [PATCH/RFC] test-lib: add support for colors without tput

2012-09-14 Thread Johannes Sixt
Am 14.09.2012 18:58, schrieb Erik Faye-Lund: > tput () { > case "$1" in > bold) > - echo -ne "\033[1m" ;; > + printf "\033[1m" ;; > setaf) > - echo -ne "\033[0;3$2m" ;; > +

Re: [PATCH/RFC] test-lib: add support for colors without tput

2012-09-14 Thread Erik Faye-Lund
On Fri, Sep 14, 2012 at 7:12 PM, Elia Pinto wrote: > 2012/9/14 Elia Pinto : >> 2012/9/14 Erik Faye-Lund : >>> On Fri, Sep 14, 2012 at 6:54 PM, Erik Faye-Lund wrote: On Fri, Sep 14, 2012 at 6:41 PM, Erik Faye-Lund wrote: > diff --git a/t/test-lib.sh b/t/test-lib.sh > index 78c4

Re: [PATCH/RFC] test-lib: add support for colors without tput

2012-09-14 Thread Elia Pinto
2012/9/14 Elia Pinto : > 2012/9/14 Erik Faye-Lund : >> On Fri, Sep 14, 2012 at 6:54 PM, Erik Faye-Lund wrote: >>> On Fri, Sep 14, 2012 at 6:41 PM, Erik Faye-Lund wrote: diff --git a/t/test-lib.sh b/t/test-lib.sh index 78c4286..7d1b34b 100644 --- a/t/test-lib.sh +++ b/t/test-li

Re: [PATCH/RFC] test-lib: add support for colors without tput

2012-09-14 Thread Erik Faye-Lund
On Fri, Sep 14, 2012 at 7:08 PM, Elia Pinto wrote: > 2012/9/14 Erik Faye-Lund : >> On Fri, Sep 14, 2012 at 6:54 PM, Erik Faye-Lund wrote: >>> On Fri, Sep 14, 2012 at 6:41 PM, Erik Faye-Lund wrote: diff --git a/t/test-lib.sh b/t/test-lib.sh index 78c4286..7d1b34b 100644 --- a/t/tes

Re: [PATCH/RFC] test-lib: add support for colors without tput

2012-09-14 Thread Elia Pinto
2012/9/14 Erik Faye-Lund : > On Fri, Sep 14, 2012 at 6:54 PM, Erik Faye-Lund wrote: >> On Fri, Sep 14, 2012 at 6:41 PM, Erik Faye-Lund wrote: >>> diff --git a/t/test-lib.sh b/t/test-lib.sh >>> index 78c4286..7d1b34b 100644 >>> --- a/t/test-lib.sh >>> +++ b/t/test-lib.sh >>> @@ -129,6 +129,20 @@ e

Re: [PATCH/RFC] test-lib: add support for colors without tput

2012-09-14 Thread Erik Faye-Lund
On Fri, Sep 14, 2012 at 6:54 PM, Erik Faye-Lund wrote: > On Fri, Sep 14, 2012 at 6:41 PM, Erik Faye-Lund wrote: >> diff --git a/t/test-lib.sh b/t/test-lib.sh >> index 78c4286..7d1b34b 100644 >> --- a/t/test-lib.sh >> +++ b/t/test-lib.sh >> @@ -129,6 +129,20 @@ export _x05 _x40 _z40 LF >> # This

Re: [PATCH/RFC] test-lib: add support for colors without tput

2012-09-14 Thread Erik Faye-Lund
On Fri, Sep 14, 2012 at 6:41 PM, Erik Faye-Lund wrote: > diff --git a/t/test-lib.sh b/t/test-lib.sh > index 78c4286..7d1b34b 100644 > --- a/t/test-lib.sh > +++ b/t/test-lib.sh > @@ -129,6 +129,20 @@ export _x05 _x40 _z40 LF > # This test checks if command xyzzy does the right thing... > # ' > #