Highlight multiple patterns at once.
Read from standard input and color patterns on the standard output.
Patterns are read from the command line, by increasing priority, and should be in the form /PATTERN/COLOR
, where:
/
is a single character delimiterPATTERN
is a regular expressionCOLOR
is one of the available colors
# list available colors
./pylight -c
# highlight some patterns
./pylight '/\N{black heart suit}/red' '/py\w*/green' '/i/blue' <<< 'I ♥ pylight-ning'
- handle multi-line patterns
- use argparse
- add more colors
- let use custom colors