logoalt Hacker News

nhanbyesterday at 11:44 AM2 repliesview on HN

>And for the UI I just pipe everything to the system's "less" command.

I never thought of that as an option. Thanks for the tip haha.


Replies

Joker_vDyesterday at 12:53 PM

Ideally, one should pipe into $PAGER, or, if that's missing, into "pager" (it's usually symlinked to less), or, if that's missing, into "less"/"more"/"cat", or, if even those are missing, then just write to stdout.

superstarryeyesyesterday at 12:19 PM

sometimes the simplest solution is the best! i love the unix philosophy:

Write programs that do one thing and do it well.

Write programs to work together.

Write programs to handle text streams, because that is a universal interface.