Skip to content
Newer
Older
100644 89 lines (53 sloc) 2.82 KB
06f4f09 @davetron5000 use man page as README
authored
1 hl(1) -- Highlight text in an output stream or file
2 ===================================================
3
4 ## SYNOPSIS
5
c2f8f38 @davetron5000 More or less working
authored
6 `hl [options] PATTERN [FILE...]`
9733b4c @davetron5000 updated README
authored
7
c2f8f38 @davetron5000 More or less working
authored
8 `hl [options] -p PATTERN [FILE...]`
06f4f09 @davetron5000 use man page as README
authored
9
10 ## INSTALL
11
12 $ gem install hl
13
14 ## DESCRIPTION
15
c2f8f38 @davetron5000 More or less working
authored
16 **hl** higlights (using ANSI escape sequences) instances of _PATTERN_ in the named input _FILEs_ or standard in if none are specified. **hl**'s goal is to assist visually scanning such output, but without trimming that output as `grep(1)` would. The most common use-case is when trying to scan the output of a `grep` 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.
17
18 _PATTERN_ can be a plain string, or a regular expression.
06f4f09 @davetron5000 use man page as README
authored
19
20 ## OPTIONS
21
22 * `-c COLOR`, `--color=COLOR`:
23 Color to use for highlighting. Available colors are red, green, yellow, blue, magenta, cyan, or white,
24 with yellow being the default.
25
c2f8f38 @davetron5000 More or less working
authored
26 * `-n`, `--[no-]inverse`:
27 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
28
29 * `-i`, `--[no-]ignore-case`:
30 Ignore case when matching. This is off by default.
31
32 * `-u`, `--[no-]underline`:
33 Underline highlight. This is off by default.
06f4f09 @davetron5000 use man page as README
authored
34
c2f8f38 @davetron5000 More or less working
authored
35 * `-b`, `--[no-]bright`:
36 Use bright colors. Shows the highlighting using the bright version of the color. This is off by default.
06f4f09 @davetron5000 use man page as README
authored
37
c2f8f38 @davetron5000 More or less working
authored
38 * `-p PATTERN`, `--regexp=PATTERN`:
39 Search term as explicit option. This is useful for searching for patterns that start with a dash.
06f4f09 @davetron5000 use man page as README
authored
40
41 * `-h`, `--help`, `--version`:
42 Show the version and help information
43
44 ## ENVIRONMENT
45
c2f8f38 @davetron5000 More or less working
authored
46 Default options can be specified in the `HL_OPTS` environment variable, exactly as they would appear on the command line. You
47 can override these switches with the `-no-` form of the options
06f4f09 @davetron5000 use man page as README
authored
48
49 ## EXAMPLES
50
51 Highlight the output of grep
52
53 grep '2012-01-02' some_log_file.txt | hl 'user_id'
54
55 Highlight the word "user_id" in bright cyan in several files
56
57 hl --color=cyan -b user_id some_file some_other_file yet_a_third_file
58
e3c997c @davetron5000 Updated with bugs
authored
59 ## BUGS
60
61 * Does not allow for highlighting multiple terms at once
62
06f4f09 @davetron5000 use man page as README
authored
63 ## AUTHOR
64
65 David Copeland, davec (at) naildrivin5.com
66
67 ## COPYRIGHT
68
69 hl is copyright(c) 2012 by David Copeland, released under the Apache license.
70
71 ## SEE ALSO
72
73 * Source on github: https://github.com/davetron5000/hl
d5b4278 @davetron5000 use generated markdown for README
authored
74
75
76 [SYNOPSIS]: #SYNOPSIS "SYNOPSIS"
77 [INSTALL]: #INSTALL "INSTALL"
78 [DESCRIPTION]: #DESCRIPTION "DESCRIPTION"
79 [OPTIONS]: #OPTIONS "OPTIONS"
80 [ENVIRONMENT]: #ENVIRONMENT "ENVIRONMENT"
81 [EXAMPLES]: #EXAMPLES "EXAMPLES"
82 [BUGS]: #BUGS "BUGS"
83 [AUTHOR]: #AUTHOR "AUTHOR"
84 [COPYRIGHT]: #COPYRIGHT "COPYRIGHT"
85 [SEE ALSO]: #SEE-ALSO "SEE ALSO"
86
87
88 [hl(1)]: hl.1.html
Something went wrong with that request. Please try again.