[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#592135: RFP: color - create ANSI escape codes to color shell output



Package: wnpp
Severity: wishlist

From the original README:

--- <snip> ---

ABOUT
-----
Color is a convenience tool to ease the use of ANSI coloring in your shell scripts by hiding the escape sequences through command substitution.

INVOKING
--------
Invoke color with no parameters to see usage information and an example. Be sure your terminal supports ANSI escape sequences! :-)

USING
-----
To use ANSI color in your shell scripts, place a color command, wrapped in $() or `` depending on your shell, before the text you want colorized, and then a $(color off) after the text.

EXAMPLE
-------
#!/bin/bash
echo -n "We have $(color bd)bold$(color off), $(color red)red$(color off), "
echo "and $(color ltcyan magenta)light cyan on magenta$(color off)."

Note: on some terminals, bold and underline may appear simply as different colors instead of actually being bold or underlined. This is a function of your terminal program, not Color.

--- snip ---

The program was written by Moshe Jacobson <moshe@runslinux.net>, the current version 1.10 was released in 2001.

Unfortunately, the original Homepage is now dead: http://runslinux.net/projects.html#color Here's a version from archive.org: http://web.archive.org/web/20030202100223/http://runslinux.net/projects.html#color
describing it this way:

--- snip ---

Color is a nifty little utility that you can call from shell scripts, that will let you easily use ANSI escape codes (for colors, bold, underline, etc) to your shell scripts without having to memorize \033[1;31m and type it every time you want a little red... Color started out as a quick hack written in Bash. I put it on Freshmeat and it got so many downloads that I realized it would be worth it to rewrite it in a faster language, so now it's in C, and is very fast. If you're a shell scripter, I know you'll like this.

--- snip ---

The release can still be found on the net, f.e. here: http://www.sourcefiles.org/Utilities/Configuration/color-1.1.tar.gz

I put a copy here: http://drop.io/itg91yj/asset/color-1-1-tar-gz

It's licensed under GNU GPL v2: http://www.gnu.org/licenses/gpl-2.0.html

It has spawned compatible re-writes:
- in Bash: https://code.google.com/p/ansi-color/
- in Ada: https://code.google.com/p/acolor/

I'd be really happy, if someone found this useful enough to package it.

--
ilf						   @jabber.berlin.ccc.de

Über 80 Millionen Deutsche benutzen keine Konsole. Klick dich nicht weg!
		-- Eine Initiative des Bundesamtes für Tastaturbenutzung

Attachment: signature.asc
Description: Digital signature


Reply to: