exa
exa copied to clipboard
-G doesn't work after #988
Compiling exa from the latest git commit no longer produces the correct output with -G, --grid
.
Previously it listed folders like this (mockup):
foo bar baz etc
dev bin
Now the same folders would be listed like this:
foo
bar
baz
etc
dev
bin
exa -G -l
seems to work as expected.
Err.. it works in some folders but not others. What on earth is going on?
Putting the link to the faulty PR here: #988
It’s weird, can you give me an example of an exact configuration that fails for you, so that I can reproduce?
Turns out that was easy.
- Create an empty folder and cd in
- Create 3-10 empty folders inside it
- Run
exa -G
and note that they display like they should - Resize window so the horizontal grid won't fit
- Run
exa -G
I can confirm the exact same behaviour for me
I have the same issue, -G option does not work.
I have the same issue if used with --icons
, but it works when I increase my font size
Original font size
Increased font size
with the help of git bisect
, I think the first bad commit is af20828
Works on my machine, whatever font size I use
Maybe a terminal difference?
The bug is definitely there, but it depends on either
- Font size
- Number of entries in folder
- Terminal
Or a combination. I just tested it in a folder with 100 entries and it works then, but in a folder with 22 entries it does not work. Using gnome-terminal. EDIT: But if you look a firths screenshot in https://github.com/ogham/exa/issues/990#issuecomment-997161947 it certainly looks like he has more than 100 entries there (though I haven't counted.)
I’m pretty sure term_grid
new version just miscalculates something. Your 100+ entries directory where it fails aren’t very useful to find the bug; an even simpler example than what @folknor has found could be helpful.
I’ll have a look at it and if it’s too complicated or whatever I’ll simply revert the term_grid
upgrade.
Not sure it is related, but I was trying to generate a grid in the pager, and miserably failing:
-
I expected to be able to obtain a grid tweeking the number of columns, but I get:
❯ env COLUMNS=30 exa | less -R Cargo.toml notes README.md src tags
same result with whatever number of columns (tested with 1000 as well).
-
While specifying the
across
flag I actually get the grid❯ env COLUMNS=30 exa -x | less -R Cargo.toml notes README.md src tags
-
Instead, autodetecting the size of the terminal just works fine...
❯ exa # in a very narrow terminal Cargo.toml README.md tags notes src
If I'm making a very stupid mistake I'd be glad to receive the explanation or being redirected...
It just seems to randomly happen sometimes. Downgrade to v0.10.0 and it works like a charm