ogham/exa

exa -G not respected

Squirreljetpack opened this issue · 3 comments

When piping exa -G | head -n 4, the output of exa is in one line mode
When running COLUMNS=4 exa -G, the output of exa is in one line mode
This differs from ls ls -C --color=always | head -n 5 which works as expected

EDIT: Seems ls has some trouble with this as well. It can only do 2 columns.
I suppose this has turned into a feature request: can we have an option to limit the number of items shown?

I bisected this to af20828:

$ git bisect bad
af208285e8a0fb383f59372c966bdb77f94006e9 is the first bad commit
commit af208285e8a0fb383f59372c966bdb77f94006e9
Author: Bastien Orivel <eijebong@bananium.fr>
Date:   Fri Dec 10 13:21:13 2021 +0100

    Update term_grid to 0.2

 Cargo.lock                 | 4 ++--
 Cargo.toml                 | 2 +-
 src/output/grid.rs         | 1 +
 src/output/grid_details.rs | 2 ++
 4 files changed, 6 insertions(+), 3 deletions(-)

That commit reverts cleanly today (on c697d06), if anyone wants a quick fix.

I'll try to bisect within term_grid itself if I can.

I think this is caused by ogham/rust-term-grid#11, and fixed by ogham/rust-term-grid#12. (I haven't looked at the code at all, but applying the PR makes exa display grids properly again.)

...apparently this was already found two years ago in #990...

This is already fixed in master and in the active fork exa.