> I wish ack would assume I want --nocolor when the env TERM is "dumb".
I'd rather not have ack figuring out terminal types. How about if you
set ACK_OPTIONS based on your term type?
xoa
--
Andy Lester => an...@petdance.com => www.petdance.com => AIM:petdance
> I'd rather not have ack figuring out terminal types. How about if you
> set ACK_OPTIONS based on your term type?
That's fine answer for people talking about strange terminals in general.
But reading on ...
>> (Whenever I run ack from inside emacs, I see a bunch of garbage
>> characters; all my other programs are apparently clever enough to
>> avoid this.)
Emacs is using his real $TERM and resetting $TERM=dumb on sub-shells
-- which would inherit his shell's $ACK_OPTIONS set according to his
real $TERM, where he may want color.
$ENV{TERM} eq q{dumb} ==> --nocolor is a reasonable special case to
support without opening the whole can of worms of $TERM arcana. Any
program that uses ^[[ codes when TERM:=dumb is broken, same as any
program emitting color ^[[ codes by default when STDOUT is a pipe is
broken. If we ignore $ENV{TERM} eq q{dumb}, we should require users of
less to enable color in .lessrc or disable color always in .ackrc to
be consistent, right?
Emacs is an important environment to support nicely in general and for
a grep-replacement in particular, and testing for 'dumb' (or undef ?)
is not a precedent for full evaluation and use of
termcap/curses/Acme::Term::Tektronix.
--
Bill
n1...@arrl.net bill....@gmail.com