.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "HL" "1" "March 2012" "" "" . .SH "NAME" \fBhl\fR \- Highlight text in an output stream or file . .SH "SYNOPSIS" \fBhl [options] PATTERN [FILE\.\.\.]\fR . .P \fBhl [options] \-p PATTERN [FILE\.\.\.]\fR . .SH "INSTALL" . .nf $ gem install hl . .fi . .SH "DESCRIPTION" \fBhl\fR higlights (using ANSI escape sequences) instances of \fIPATTERN\fR in the named input \fIFILEs\fR or standard in if none are specified\. \fBhl\fR\'s goal is to assist visually scanning such output, but without trimming that output as \fBgrep(1)\fR would\. The most common use\-case is when trying to scan the output of a \fBgrep\fR invocation that has complex data or long lines\. In this case, you don\'t want to further grep the output for the term you\'re looking for, bit instead simply need a visual cue as to where the secondary search term is in the output\. . .P \fIPATTERN\fR can be a plain string, or a regular expression\. . .SH "OPTIONS" . .TP \fB\-c COLOR\fR, \fB\-\-color=COLOR\fR Color to use for highlighting\. Available colors are red, green, yellow, blue, magenta, cyan, or white, with yellow being the default\. . .TP \fB\-n\fR, \fB\-\-[no\-]inverse\fR Inverse highlight\. Shows the highlighting in inverse, with the background of the highlight being the selected color and the foreground being the color of your terminal\'s background\. This is off by default . .TP \fB\-i\fR, \fB\-\-[no\-]ignore\-case\fR Ignore case when matching\. This is off by default\. . .TP \fB\-u\fR, \fB\-\-[no\-]underline\fR Underline highlight\. This is off by default\. . .TP \fB\-b\fR, \fB\-\-[no\-]bright\fR Use bright colors\. Shows the highlighting using the bright version of the color\. This is off by default\. . .TP \fB\-p PATTERN\fR, \fB\-\-regexp=PATTERN\fR Search term as explicit option\. This is useful for searching for patterns that start with a dash\. . .TP \fB\-h\fR, \fB\-\-help\fR, \fB\-\-version\fR Show the version and help information . .SH "ENVIRONMENT" Default options can be specified in the \fBHL_OPTS\fR environment variable, exactly as they would appear on the command line\. You can override these switches with the \fB\-no\-\fR form of the options . .SH "EXAMPLES" Highlight the output of grep . .IP "" 4 . .nf grep \'2012\-01\-02\' some_log_file\.txt | hl \'user_id\' . .fi . .IP "" 0 . .P Highlight the word "user_id" in bright cyan in several files . .IP "" 4 . .nf hl \-\-color=cyan \-b user_id some_file some_other_file yet_a_third_file . .fi . .IP "" 0 . .SH "BUGS" . .IP "\(bu" 4 Does not allow for highlighting multiple terms at once . .IP "" 0 . .SH "AUTHOR" David Copeland, davec (at) naildrivin5\.com . .SH "COPYRIGHT" hl is copyright(c) 2012 by David Copeland, released under the Apache license\. . .SH "SEE ALSO" . .IP "\(bu" 4 Source on github: https://github\.com/davetron5000/hl . .IP "" 0