All Projects → arsham → Blush

arsham / Blush

Licence: mit
Grep with colours

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Blush

exch
a command-line tool to see currency exchange rates
Stars: ✭ 20 (-95.12%)
Mutual labels:  terminal-app
Github cli
GitHub on your command line. Use your terminal, not the browser.
Stars: ✭ 263 (-35.85%)
Mutual labels:  terminal-app
Ack3
ack is a grep-like search tool optimized for source code.
Stars: ✭ 330 (-19.51%)
Mutual labels:  grep
Typon
A multi-featured typing practice tool that runs on a terminal emulator which can turn any text file into a typing game.
Stars: ✭ 53 (-87.07%)
Mutual labels:  terminal-app
grep for osint
GREP FOR OSINT is a set of very simple shell scripts that will help you quickly analyze a text or a folder with files for data useful for investigation (phone numbers, bank card numbers, URLs, emails and nicknames).
Stars: ✭ 21 (-94.88%)
Mutual labels:  grep
Rg.el
Emacs search tool based on ripgrep
Stars: ✭ 277 (-32.44%)
Mutual labels:  grep
jira-cli
🔥 [WIP] Feature-rich interactive Jira command line.
Stars: ✭ 809 (+97.32%)
Mutual labels:  terminal-app
Bitwise
Terminal based bit manipulator in ncurses
Stars: ✭ 380 (-7.32%)
Mutual labels:  terminal-app
vim-highlighter
Highlight words and expressions
Stars: ✭ 57 (-86.1%)
Mutual labels:  grep
Linuxtool
Linux下常用工具、命令介绍,跟我学Linux
Stars: ✭ 314 (-23.41%)
Mutual labels:  grep
CoTerminalApps
Retro ASCII Puzzles plus SpaceInvaders, Pacman & Frogger arcade games that run WITH SOUND in a terminal on any platform !!
Stars: ✭ 21 (-94.88%)
Mutual labels:  terminal-app
json2
xml2 for JSON; like gron
Stars: ✭ 24 (-94.15%)
Mutual labels:  grep
Teip
Select partial standard input and replace with the result of another command efficiently
Stars: ✭ 280 (-31.71%)
Mutual labels:  grep
RecoverPy
🙈 Interactively find and recover deleted or 👉 overwritten 👈 files from your terminal
Stars: ✭ 189 (-53.9%)
Mutual labels:  grep
Ticker
Terminal stock ticker with live updates and position tracking
Stars: ✭ 3,986 (+872.2%)
Mutual labels:  terminal-app
my-termux-setup
Here is My Termux Terminal Emulator Setup & Packages
Stars: ✭ 97 (-76.34%)
Mutual labels:  grep
Pydoro
🍅 pydoro - Terminal Pomodoro Timer
Stars: ✭ 277 (-32.44%)
Mutual labels:  terminal-app
Figurine
Print your name in style
Stars: ✭ 408 (-0.49%)
Mutual labels:  terminal-app
Rebound
Command-line tool that instantly fetches Stack Overflow results when an exception is thrown
Stars: ✭ 3,763 (+817.8%)
Mutual labels:  terminal-app
Spotui
Spotify in the terminal 💻🎶
Stars: ✭ 302 (-26.34%)
Mutual labels:  terminal-app

Blush

License: MIT GoDoc Build Status Coverage Status Go Report Card Codacy Badge

With Blush, you can grep with any colours of your choice.

Colored

  1. Install
  2. Usage
  3. Arguments
  4. Colour Groups
  5. Colours
  6. Complex Grep
  7. Suggestions
  8. License

Install

You can grab a binary from releases page. If you prefer to install it manually you can get the code and install it with the following command:

$ go get github.com/arsham/blush

Make sure you have go>=1.7 installed.

Update

In order to update the program:

$ cd $GOPATH/src/github.com/arsham/blush
$ make update
$ make install

Usage

Match Method

This method shows matches with the given input:

$ blush -b "first search" -g "second one" -g "and another one" files/paths

Any occurrence of first search will be in blue, second one and and another one are in green.

Colored

Colouring Method

With this method all texts are shown, but the matching words are coloured. You can activate this mode by providing --colour or -C argument.

Colored

Piping

Blush can also read from a pipe:

$ cat FILENAME | blush -b "print in blue" -g "in green" -g "another green"
$ cat FILENAME | blush "some text"

Arguments

+---------------+----------+------------------------------------------------+
|    Argument   | Shortcut |                     Notes                      |
+---------------+----------+------------------------------------------------+
| --colour      | -C       | Colour, don't drop anything.                   |
| N/A           | -i       | Case insensitive matching.                     |
| N/A           | -R       | Recursive matching.                            |
| --no-colour   | N/A      | Don't colourize matches.                       |
| --no-color    | N/A      | Same as --no-colour.                           |
| --no-filename | -h       | Suppress the prefixing of file names on output.|
+---------------+----------+------------------------------------------------+

File names or paths are matched from the end. Any argument that doesn't match any files or paths are considered as regular expression. If regular expressions are not followed by colouring arguments are coloured based on previously provided colour:

$ blush -b match1 match2 FILENAME

Colored

Notes

  • If no colour is provided, blush will choose blue.
  • If you only provide file/path, it will print them out without colouring.
  • If the matcher contains only alphabets and numbers, a non-regular expression is applied to search.

Colour Groups

You can provide a number for a colour argument to create a colour group:

$ blush -r1 match1 -r2 match2 -r1 match3 FILENAME

Colored

All matches will be shown as blue. But match1 and match3 will have a different background colour than match2. This means the numbers will create colour groups.

You also can provide a colour with a series of match requests:

$ blush -r match1 match3 -g match2 FILENAME

Colours

You can choose a pre-defined colour, or pass it your own colour with a hash:

+-----------+----------+
|  Argument | Shortcut |
+-----------+----------+
| --red     | -r       |
| --green   | -g       |
| --blue    | -b       |
| --white   | -w       |
| --black   | -bl      |
| --yellow  | -yl      |
| --magenta | -mg      |
| --cyan    | -cy      |
+-----------+----------+

You can also pass an RGB colour. It can be in short form (--#1b2, -#1b2), or long format (--#11bb22, -#11bb22).

Colored

Complex Grep

You must put your complex grep into quotations:

$ blush -b "^age: [0-9]+" FILENAME

Colored

Suggestions

This tool is made to make your experience in terminal a more pleasant. Please feel free to make any suggestions or request features by creating an issue.

Please see changelog document for newest changes.

License

Use of this source code is governed by the MIT License. License file can be found in the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].