#command-output #command-line-tool #log #stops #cli #insert #spacers

app spacer

A CLI utility for adding spacers when command output stops

8 releases

0.3.0 Sep 18, 2023
0.2.0 Aug 31, 2023
0.1.8 Jun 25, 2023

#17 in #insert

Download history 10/week @ 2024-06-21 3/week @ 2024-06-28 2/week @ 2024-07-05 4/week @ 2024-07-12 4/week @ 2024-07-19 107/week @ 2024-07-26 9/week @ 2024-08-02 16/week @ 2024-08-23 12/week @ 2024-08-30 13/week @ 2024-09-06 23/week @ 2024-09-13 26/week @ 2024-09-20 39/week @ 2024-09-27 19/week @ 2024-10-04

110 downloads per month

MIT license

20KB
459 lines

spacer

Build status Crates.io

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

If you're the type of person that habitually presses enter a few times in your log tail to know where the last request ended and the new one begins, this tool is for you!

Installation

With Homebrew:

brew install spacer

Direct from Cargo:

cargo install spacer

Usage

By default, spacer outputs a spacer after 1 second with no output. You can change this with the --after flag.

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

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

STDOUT and STDERR

Some commands output most of their information on STDERR, not STDOUT. spacer only monitors STDOUT, so if you find a situation where spacer doesn't seem to be working it could be that the program you're piping from is using STDERR.

To "fix" that, redirect STDERR to STDOUT by using 2>&1 in your command:

my-command 2>&1 | spacer

Dependencies

~12–27MB
~361K SLoC