sharkdp / riffle

A simple terminal pager (as a library)
45 stars 1 forks source link

Design goals #1

Open sharkdp opened 4 years ago

sharkdp commented 4 years ago

Advantages of a "pager" as a library:

A few advantages if we would use a builtin pager in bat:

stdedos commented 2 years ago

Links added; feel free to use my text and remove the comment

Let's use this ticket to discuss some ideas and possible upsides/downsides of writing our own custom pager library that we could use instead of calling an external $PAGER process (or, essentially, less).

A few advantages if we would use a builtin pager in bat:

General advantages of a "pager" as a library (not just for bat):

The obvious downsides are:

One way to circumvent the second point would be to make this an opt-in feature, at least in the beginning.

I have actually started to implement a really simple cross-platform pager-as-a-library like this in a private repository. The first results look promising 😄 out

I'd be happy to hear about your thoughts and ideas!