Author: Amosnimos
License: GNU Affero General Public License
Description: HIG (Highlight In General): A simple bash utility to highlight specified words in piped or file input with customizable colors, preserving the original text.
hig
is a utility developed by Amosnimos for highlighting specific words or phrases in text files or command output. It’s designed to bring easy, flexible highlighting to your command line experience, setting it apart from typical utilities like grep
.
- Highlights specific keywords in piped or file input.
- Customize highlight color for text background or foreground.
- Supports both color inversion and foreground highlight modes.
- Accepts input directly from a file or from a pipe.
- Clean and easy to read – provides essential highlighting without altering text content.
Download the latest version of hig
from GitHub:
https://github.com/Amosnimos/hig
Use hig
to highlight specific words or phrases in text from either a file or pipe input. Below are some examples:
Basic usage with pipe input:
echo "hello world" | hig -s world
Specifying a background highlight color:
echo "hello world" | hig -s world -c red
Using a file as input:
hig -s "search_term" -f /path/to/file.txt -c green
Inverting colors to highlight text instead of the background:
echo "hello world" | hig -s world -i -c yellow
-s
,--search <term>
: The term or phrase to highlight.-f
,--file <filename>
: Use a file as input instead of pipe data.-c
,--color <color>
: Background color for highlighting (default: yellow).-i
,--invert
: Inverts color to highlight text instead of background.-h
,--help
: Display help information.
hig
was built for cases where you need to visually highlight a word or phrase without filtering lines like grep
. Here’s how it’s different:
- No filtering:
hig
keeps all content and simply adds color to your keyword. - Color flexibility: Customize highlight color for quick visual scanning.
- Readability: Useful for highlighting terms in logs or output without removing lines.
hig
is licensed under the GNU Affero General Public License (AGPL), ensuring users' freedom to run, share, and modify the software. For full license details, see the GNU AGPL-3.0 License.
Developed by Amosnimos, 2024