zsh-users
 help / color / mirror / code / Atom feed
* coloring STDERR to terminal
@ 2004-06-27 23:22 Atom 'Smasher'
  2004-06-28  0:06 ` ari
  2004-06-29 15:43 ` Bart Schaefer
  0 siblings, 2 replies; 26+ messages in thread
From: Atom 'Smasher' @ 2004-06-27 23:22 UTC (permalink / raw)
  To: zsh-users

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

i'm not sure if this is possible without patching some sources, but here's 
what i want to do... every time STDERR is directed to a terminal, i want 
to filter it through _something_like_ this:
 	awk '{print "^[[91m"$0"^[[0m"}'

i want my STDERR to be a different color than my STDOUT (when STDERR is 
being directed to my terminal).

is there a way to do that in my dot-zshrc?

it would be neat if i could do some tricks with exec and shuffle STDERR 
through a filter like that... i'm not sure if it would be better to invoke 
`awk` once per shell, or every time STDERR is directed to a terminal... 
both ways have drawbacks. i'm not sure that's it's even possible to do it 
that way... or, if done that way, if it's possible to differentiate 
between output going to a terminal or not.

ideally, i think this would require a new environment variable... maybe 
something like STDERR_COLOR, and can probably just take an integer as a 
value and fill in the control sequences around it... among other 
advantages, there'd be no dependence on an external application. also, 
that's probably the only way to accurately deal with situations when 
STDERR isn't followed by a newline before STDOUT comes along.

if i was any good at coding in C i'd write a patch... but C is still on my 
list of things to master.

thanks...

         ...atom

  _________________________________________
  PGP key - http://atom.smasher.org/pgp.txt
  762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
  -------------------------------------------------

 	"The conservation movement is a breeding ground of Communists
 	 and other subversives.  We intend to clean them out, even if
 	 it means rounding up every bird watcher in the country."
 		-- John Mitchell, US Atty. General 1969-1972
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.6 (FreeBSD)
Comment: What is this gibberish?
Comment: http://atom.smasher.org/links/#digital_signatures

iEYEARECAAYFAkDfVrIACgkQnCgLvz19QeOxOQCdHBPSy1F/k2Sr69kPCN0XCBEo
OxoAn3y5XBWYEq8qAm8sMKduHpsfy6RS
=csXO
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2004-07-30 23:46 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-27 23:22 coloring STDERR to terminal Atom 'Smasher'
2004-06-28  0:06 ` ari
2004-06-28  0:36   ` Atom 'Smasher'
2004-06-29 15:43 ` Bart Schaefer
2004-06-29 16:08   ` Vincent Lefevre
2004-06-29 17:14     ` Bart Schaefer
2004-06-30  7:09       ` Vincent Lefevre
2004-06-30 10:52         ` Bart Schaefer
2004-06-30 11:43           ` Vincent Lefevre
2004-06-30 12:01             ` Vincent Lefevre
2004-06-30 16:56             ` Bart Schaefer
2004-07-01 18:14               ` Vincent Lefevre
2004-07-02  0:11                 ` Bart Schaefer
2004-07-02 12:42                   ` Vincent Lefevre
2004-07-02 21:32                     ` Bart Schaefer
2004-07-20  9:10                     ` Atom 'Smasher'
2004-07-20 16:10                       ` Bart Schaefer
2004-07-20 19:27                         ` Atom 'Smasher'
2004-07-20 21:15                           ` Bart Schaefer
2004-07-20 23:30                             ` Wayne Davison
2004-07-21  3:15                               ` Bart Schaefer
2004-07-21  6:23                                 ` Wayne Davison
2004-07-21  7:30                                   ` Bart Schaefer
2004-07-21 13:19                                   ` Vincent Lefevre
2004-07-30 11:50                     ` Andy Spiegl
2004-07-30 23:44                       ` Vincent Lefevre

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).