ogham / exa

A modern replacement for ‘ls’.
https://the.exa.website/
MIT License
23.61k stars 660 forks source link

exa -G not respected #1198

Closed Squirreljetpack closed 1 year ago

Squirreljetpack commented 1 year ago

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?

sersorrel commented 1 year ago

I bisected this to af208285e8a0fb383f59372c966bdb77f94006e9:

$ 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 c697d066702ab81ce0684fedb4c638e0fc0473e8), if anyone wants a quick fix.

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

sersorrel commented 1 year ago

I think this is caused by https://github.com/ogham/rust-term-grid/issues/11, and fixed by https://github.com/ogham/rust-term-grid/pull/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...

ariasuni commented 1 year ago

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