eza: Grid view is broken

Running --grid with the latest git version of zetta is broken on my machine.

E.g. by doing cargo run --release -- --grid, or using an installed version (see screenshot below).

2023-07-28_13-43

This is a fairly severe regression as the the default expected behavior of exa/zetta is to run --grid if nothing else is specified.

https://github.com/ogham/exa/pull/1165#issuecomment-1650420594

https://github.com/syphar/zetta/issues/4

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 30 (18 by maintainers)

Commits related to this issue

Most upvoted comments

After a bisect, I’ve arrive here:

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(-)

af208285e8a0fb383f59372c966bdb77f94006e9

Gonna see if I can solve it.

What a problem with that rust programmers?.. Are they really capable of producing at least working as expected software?

I don’t bother myself spending time with so shitty language - such a waste of time!

And I provided an example of how it is not working - which puts us to condition where - no, they are not.

What a problem with that rust programmers?.. Are they really capable of producing at least working as expected software?

Yes, yes they are.

Look, you were even so nice and provided an example of a working rust project, as far as I can tell: https://github.com/eza-community/eza/issues/66#issuecomment-2198567463

@tribals has been blocked from all @eza-community projects for the time being, we do not tolerate that kind of behavior

In which case does terminal_size::terminal_size_using_fd return None? Could the terminal be incompatible?

row_threshold (the parsed value of EZA_GRID_ROWS) is only taken into account when a terminal column width could be determined or is set by the user. https://github.com/eza-community/eza/blob/c58ddcb7aa6b2cd0466869983cb701c45b5cbbc3/src/main.rs#L462

If the terminal width is None, then EZA_GRID_ROWS has no effect. https://github.com/eza-community/eza/blob/main/src/main.rs#L471

Are any other eza or exa environment variables set in the terminal session? Which terminal is in use on which OS?

The only thing I can imagine from your example is that your terminal is wide enough that more rows could fit but only a maximum of 3 rows is rendered.

But that is only a suspicion. Can you elaborate what exactly is wrong (e.g. your terminal is wide enough, your terminal is smaller so too many rows are rendered, etc.)? Or do you have a screenshot of the output, which is kinda necessary to debug issues with the grid display.

Regarding https://github.com/uutils/uutils-term-grid/issues/6, do you think the behavior should change in uutils-term-grid? I don’t really care myself but I figured it could matter to some people here.