sago35 / colorgo

colorize stdout by regex

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

colorgo

colorize stdout by regex

Demo

$ git help | colorgo  diff Red  lo\w* Grean

Japanese is ok.

$ subst /? | colorgo -i cp932 "ドライブ|パス" Red

Usage

USAGE:
    gocolor.go [OPTIONS] [ REGEX  COLOR ]*

OPTIONS:
    --input, -i "utf8"  input encoding
    --output, -o "utf8" output encoding
    --help, -h          show help
    --version, -v       print the version

OTHER:
    Default encoding is utf8 for input and output.
    Supported encodings are below.

        cp932 shijtjis eucjp utf8
        and encodings supported by mahonia

    REGEX : Regular expression

    COLOR : Color name

        None
        Black
        Red
        Green
        Yellow
        Blue
        Magenta
        Cyan
        White

Install

go get github.com/sago35/colorgo

Contribution

TBD.

Licence

MIT

Author

sago35

About

colorize stdout by regex


Languages

Language:Go 100.0%