[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Terminal escape sequences from configure/make test



Howard Chu writes:
> A quick survey of HPUX, AIX, and Solaris show they all support it; it 
> has probably been around for quite some time. I don't have my 4.2BSD 
> manuals handy at the moment but I'd bet it was supported there too.

I realized my suggestion was nonsense just after posting anyway:-)
2>/dev/null just decides that nobody sees an error message.

This one should be safe:

  TB= TN=
  if test -t 1 2>/dev/null || test -n "`test -t 1 2>&1`" ; then
    TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
    TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
  fi

Sets the terminal escapes if test -t 1 returns failure and no output.

-- 
Hallvard