]> git.refcnt.org Git - colorize.git/blobdiff - colorize.1
Add examples to man page
[colorize.git] / colorize.1
index 1ce1a7250e78ac5f8f2d0765209e8d1b0545d4b8..3b114dd63de46e5a0d7585834bb6480687f3eb09 100644 (file)
@@ -1,10 +1,10 @@
-.TH COLORIZE 1 "2015-03-02" "colorize v0.57" "User Commands"
+.TH COLORIZE 1 "2019-02-23" "colorize v0.64" "User Commands"
 .SH NAME
-colorize \- colorize text with escape sequences
+colorize \- colorize text on terminal with ANSI escape sequences
 .SH SYNOPSIS
-\fBcolorize\fR [\fIoption\fR] (\fIforeground\fR) [\fIfile\fR]
+\fBcolorize\fR [\fIoption\fR]... (\fIforeground\fR) [\fIfile\fR]
 .PP
-\fBcolorize\fR [\fIoption\fR] (\fIforeground\fR)/(\fIbackground\fR) [\fIfile\fR]
+\fBcolorize\fR [\fIoption\fR]... (\fIforeground\fR)/(\fIbackground\fR) [\fIfile\fR]
 .PP
 \fBcolorize\fR \-\-clean[\-all] [\fIfile\fR]
 .PP
@@ -28,6 +28,12 @@ were emitted by colorize (see NOTES for list), whereas \-\-clean\-all
 omits all valid ones.  If in doubt, consider using \-\-clean\-all.
 .SH OPTIONS
 .TP
+.BR \-\-attr=\fIATTR1,ATTR2,...\fR
+set attributes by name
+.RS
+Attributes: bold, underscore, blink, reverse and concealed.
+.RE
+.TP
 .BR \-\-clean
 clean text from color escape sequences emitted by colorize
 .TP
@@ -37,6 +43,9 @@ clean text from all valid color escape sequences
 .BR \-\-exclude\-random=\fICOLOR\fR
 text color to be excluded when selecting a random foreground color
 .TP
+.BR \-\-omit\-color\-empty
+omit printing color escape sequences for empty lines
+.TP
 .BR \-h ", " \-\-help
 show help screen and exit
 .TP
@@ -48,10 +57,26 @@ as follows:
 .IP * 4
 30-37,39 (foreground colors)
 .IP * 4
-1;30-37,39 (bold foreground colors)
+1-9;30-37,39 (foreground colors with attributes)
 .IP * 4
 40-47,49 (background colors)
 .IP * 4
 0 (reset)
+.SH EXAMPLES
+.TP
+$ \fBcolorize green /etc/motd\fR
+Print file /etc/motd with green as foreground color
+.TP
+$ \fBcolorize green/black /etc/motd\fR
+Print file /etc/motd with green as foreground and black as background color
+.TP
+$ \fBcolorize green /etc/motd | colorize --clean\fR
+Print input from stdin with color escape sequences omitted
+.TP
+$ \fBgit log -1 -p --color | colorize --clean-all\fR
+Print input from stdin with all color escape sequences omitted
+.TP
+$ \fBcolorize --attr=bold green /etc/motd\fR
+Print file /etc/motd with bold green as foreground color
 .SH AUTHOR
 Steven Schubiger <stsc@refcnt.org>