GitHub - ankurokok/hr: A colored bar that marks where you are in your terminal.

1 min read Original article ↗

Print a solid colored bar across your terminal. A visual scrollback marker for telling apart sessions, runs, or moments where one program ends and another begins.

asciicast

Install

Drop bin/hr anywhere on your PATH:

git clone https://github.com/ankurokok/hr.git
ln -s "$(pwd)/hr/bin/hr" ~/.local/bin/hr   # or copy it; works the same

Requires bash 3.2+ (macOS default) and a terminal that supports ANSI color.

Usage

hr                              # red bar with timestamp on the right
hr started build                # left-aligned message
hr -c blue running tests        # change color
hr --color yellow heads up      # text auto-darkens for legibility

Colors: black red green yellow blue magenta cyan white (default red). Quotes around the message aren't required.

Test

License

MIT — see LICENSE.