bugfix readme formating

This commit is contained in:
nojhan 2012-07-09 10:16:25 +02:00
commit bbc0cf5aa3

View file

@ -9,7 +9,7 @@ colout(1) -- Color Up Arbitrary Command Ouput
## DESCRIPTION
`colout` read lines of text stream on the standard input and output characters
matching a given regular expression <PATTERN> in given <COLOR> and <STYLE>.
matching a given regular expression *PATTERN* in given <COLOR> and *STYLE*.
If groups are specified in the regular expression pattern, only them are taken
into account, else the whole matching pattern is colored.
@ -25,7 +25,7 @@ any number between 0 and 255.
Available styles are: normal, bold, faint, italic, underline, blink,
rapid_blink, reverse, conceal.
When not specified, a <COLOR> defaults to _red_ and a <STYLE> defaults to _bold_.
When not specified, a *COLOR* defaults to _red_ and a *STYLE* defaults to _bold_.
`colout` is released under the GNU Public License v3.
@ -51,29 +51,29 @@ special characters that would be recognize by your shell.
## EXAMPLES
* Color in bold red every occurence of the word _color_ in colout sources:
cat colout.py | colout color red bold
`cat colout.py | colout color red bold`
* Color in bold violet home directories in _/etc/passwd_:
colout /home/[a-z]+ 135 < /etc/passwd
`colout /home/[a-z]+ 135 < /etc/passwd`
* Color in yellow user/groups id, in bold green name and in bold red home directories in _/etc/passwd_:
colout :x:\([0-9]+:[0-9]+\):\([a-z]+\).*\(/home/[a-z]+\) yellow,green,red normal,bold < /etc/passwd
`colout :x:\([0-9]+:[0-9]+\):\([a-z]+\).*\(/home/[a-z]+\) yellow,green,red normal,bold < /etc/passwd`
* Color in yellow file permissions with read rights for everyone:
ls -l | colout .\(r.-\){3} yellow normal
`ls -l | colout .\(r.-\){3} yellow normal`
* Color in green read permission, in bold red write and execution ones:
ls -l | colout \(r\)\(w*\)\(x*\) green,red normal,bold
`ls -l | colout \(r\)\(w*\)\(x*\) green,red normal,bold`
* Color in green comments in colout sources:
colout .*\(#.*\)$ green normal < colout.py
`colout .*\(#.*\)$ green normal < colout.py`
* Color in light green comments in non-empty colout sources, with the sharp in bold green:
grep -v ^\\s*$ colout.py | colout .*\(#\)\(.*\)$ green,119 bold,normal
`grep -v ^\\s*$ colout.py | colout .*\(#\)\(.*\)$ green,119 bold,normal`
* Color in bold green every numbers and in bold red the words _error_ in make output:
make 2>&1 | colout [0-9]+ green normal | colout error
`make 2>&1 | colout [0-9]+ green normal | colout error`
* Color a make output, line numbers in yellow, errors in bold red, warning in magenta, pragma in green and C++ file base names in cyan:
make 2>&1 | colout :\([0-9]+\):[0-9]* yellow normal | colout error | colout warning magenta | colout pragma green normal | colout /\(\\w+\)*\.\(h\|cpp\) cyan normal
`make 2>&1 | colout :\([0-9]+\):[0-9]* yellow normal | colout error | colout warning magenta | colout pragma green normal | colout /\(\\w+\)*\.\(h\|cpp\) cyan normal`