-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
85 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package cmd | ||
|
||
import "errors" | ||
|
||
// These variables are used for showing help messages on command line. | ||
var ( | ||
errShowHelp = errors.New("show errors") | ||
|
||
Help = "Usage: blush [OPTION]... PATTERN [FILE]...\nTry 'blush --help' for more information." | ||
Usage = `Usage: blush [OPTION]... PATTERN [FILE]... | ||
Colours: | ||
-r, --red Match decorated with red colour. See Stock Colours section. | ||
-r[G], --red[G] Matches are grouped with the group number. | ||
Example: blush -b1 match filename | ||
-#RGB, --#RGB Use user defined colour schemas. | ||
Example: blush -#1eF match filename | ||
-#RRGGBB, --#RRGGBB Same as -#RGB/--#RGB. | ||
Pattern: | ||
You can use simple pattern or regexp. If your pattern expands between | ||
multiple words or has space in between, you should put them in quotations. | ||
Stock Colours: | ||
-r, --red | ||
-g, --green | ||
-b, --blue | ||
-w, --white | ||
-bl, --black | ||
-yl, --yellow | ||
-mg, --magenta | ||
-cy, --cyan | ||
Control arguments: | ||
-C, --colour Don't drop unmatched lines. | ||
-i Case insensitive match. | ||
--no-colour, --no-color Don't colourise the output. | ||
-h, --no-filename Suppress the prefixing of file names on output. | ||
Multi match colouring: | ||
blush -b match1 [match2]...: will colourise all matches with the same colour. | ||
Using pipes: | ||
cat FILE | blush -b match [-g match]... | ||
` | ||
) |