Settings

Theme

Show HN: Stail.sh – Short Tail

gist.github.com

2 points by Sidneys1 3 years ago · 0 comments · 1 min read

Reader

This is a fairly short (59 LOC) utility script that allows you to tail the output of a command, but while only showing the last -n (default 5) lines of output without scrolling the output buffer. It will trim lines to the terminal width (rather than wrap them) to avoid splitting terminal escape sequences. You can also optionally -p PREFIX each line of output. Finally, it (by default) removes blank/whitespaces lines, but they can be preserved with -w.

Video of it in action here: https://i.imgur.com/VkBzA5S.mp4 (recorded with github.com/charmbracelet/vhs)

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection