https://github.com/dpc/colerr
Colorize stderr
https://github.com/dpc/colerr
Last synced: 8 months ago
JSON representation
Colorize stderr
- Host: GitHub
- URL: https://github.com/dpc/colerr
- Owner: dpc
- Created: 2015-07-13T01:41:06.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-08-19T22:48:03.000Z (almost 10 years ago)
- Last Synced: 2025-01-09T23:37:57.198Z (over 1 year ago)
- Language: Rust
- Size: 3.57 MB
- Stars: 16
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `colerr`
## Introduction
`colerr` will wrap a given process and colorize it's standard error output.
`colerr` is written in [rust programming language][rust] and utilizes:
[mio][mio] and [mioco][mioco] libraries. You probably don't care, but it's kind
of important so I've mentioned it here.
[mio]: https://github.com/carllerche/mio
[mioco]: https://github.com/dpc/mioco
[rust]: http://rust-lang.org
# Building
You need [rust][rust] compiler bundled with `cargo`. Then `cargo build --release` should do the job.
Resulting binary will be in `./target/release/colerr`. Just copy it to somewhere to your `$PATH`.
```
Usage:
colorout [--] ...
```
# Internals
`colerr` works by spawning a IO-handling child process that takes care of
colorizing output. The parent process `exec`-s the requested command with
`stdin`, `stdout` and `stderr` routed to a child.
This way `colerr` can be used as a drop-in replacement, as the `colerr`-ed PID
will be the PID of the wrapped command. All signals etc. will be handled by the
wrapped process itself, the only difference being a standard IO being handled
by additional child process.