Git Product home page Git Product logo

hl's Introduction

hl(1) -- Highlight text in an output stream or file

SYNOPSIS

hl [options] PATTERN [FILE...]

hl [options] -p PATTERN [FILE...]

INSTALL

$ gem install hl

DESCRIPTION

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.

PATTERN can be a plain string, or a regular expression.

OPTIONS

  • -c COLOR, --color=COLOR: Color to use for highlighting. Available colors are red, green, yellow, blue, magenta, cyan, or white, with yellow being the default.

  • -n, --[no-]inverse: 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

  • -i, --[no-]ignore-case: Ignore case when matching. This is off by default.

  • -u, --[no-]underline: Underline highlight. This is off by default.

  • -b, --[no-]bright: Use bright colors. Shows the highlighting using the bright version of the color. This is off by default.

  • -p PATTERN, --regexp=PATTERN: Search term as explicit option. This is useful for searching for patterns that start with a dash.

  • -h, --help, --version: Show the version and help information

ENVIRONMENT

Default options can be specified in the HL_OPTS environment variable, exactly as they would appear on the command line. You can override these switches with the -no- form of the options

EXAMPLES

Highlight the output of grep

grep '2012-01-02' some_log_file.txt | hl 'user_id'

Highlight the word "user_id" in bright cyan in several files

hl --color=cyan -b user_id some_file some_other_file yet_a_third_file

BUGS

  • Does not allow for highlighting multiple terms at once

AUTHOR

David Copeland, davec (at) naildrivin5.com

COPYRIGHT

hl is copyright(c) 2012 by David Copeland, released under the Apache license.

SEE ALSO

hl's People

Contributors

davetron5000 avatar

Watchers

James Cloos avatar Christo De Lange avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.