Software & Apps

samwho/spacer: CLI tool to insert spacers when command output stops

Build a situation
Crates.io

spacer is a simple CLI tool to insert spacers when the command output stops.

If you are the type of person who is used to pressing enter several times in your log tail to know where the last request ends and the new one begins, this tool is for you!

With Homebrew:

Direct from Cargo:

By default, spacer releases a spacer after 1 second of no output. You can change it with the --after flag.

tail -f some.log | spacer --after 5

--after accepts a number of seconds, and allows floating point numbers for more precision.

Some commands output most of their information to STDERR, not STDOUT. spacer
only monitors STDOUT, so if you see a situation where spacer It seems that the program you are using to use STDERR may not work.

To “fix” that, pipe STDERR to STDOUT in the spacer using |& instead of
| like pipe characters:


https://opengraph.githubassets.com/350c1f96e1d993bba74191e8c8ad60390ef99be377b9502b8330d9253efaba74/samwho/spacer

2024-12-21 11:27:00

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button