Open flexyboooy opened 10 months ago
what do you mean by pagination, could you please provide some examples so that we can think about it
Like what less
does
Well this could be an idea to implement. We need to have a deeper look at this
I wondered about this too. It looks as if you can already keep the pretty colors if you do
eza --color=always | less -R
bat
does this and I quite like it, it's definitely worth considering.
This would be really nice. Like @ashmanskas wrote, this is already possible but the -G (grid) flag doesn't really work when piped into less unless you supply a --width value.
Workaround for this is doing something like this:
eza --color=always --grid --width $COLUMNS | less -FRi
(took the liberty of using F to exit if pagination is not needed and i for ignoring case when searching within less)
I don't think we should ever default to pagination, but we could have something like bat's --pager
--paging
and such, I think there is also a relevant environment variable for setting a pager.
We shouldn't implement an actual pager ourselves thou, just the ability to work with one.
I think it would be nice to just start simply with a --paging
flag that sends the output of eza into a pager, then expand to auto/always/never
(making no arg default to always) to page contextually, based on if we'd use more lines than the terminal currently has, then we can look into --pager <pager>
or some PAGER
or EZA_PAGER
that takes precedence over the system pager (we should ensure that the PAGER var is common).
That is also to say, one PR at a time, building out this system may be overwhelming if done in one large PR!
I don't think we should ever default to pagination
Well, unless we have something like e.g. a config file to set it of course... but again, let's start with the simple case :p
eza --color=always --grid --width $COLUMNS | less -FRi
sad that it doesn't work with --icons
(at least on my machine)
(that's an issue with less
, not eza)
Am I too stoned rn or is eza missing a feature for output pagination?
Sure, I could pipe (huh huh) to e.g. less, but then I lose all the pretty colours, don't I?
Certainly not a priority but would be dang useful when listing subdirectories ...