Skip to content

bug: "across" isn't respected if options are "--grid --long --across" #1646

@0xf1e

Description

@0xf1e

Hi!

I'm currently sitting in a rust meetup, (haven't coded rust in a year), and I decided to use my three hours to address this issue that's been bugging me:

Expected output:

❯ eza --long --grid --across
.rw-rw-r-- 0 fie 21 Oct 19:57  1    .rw-rw-r-- 0 fie 21 Oct 19:57  2    .rw-rw-r-- 0 fie 21 Oct 19:57  3
.rw-rw-r-- 0 fie 21 Oct 19:57  4    .rw-rw-r-- 0 fie 21 Oct 19:57  5    .rw-rw-r-- 0 fie 21 Oct 19:57  6
❯ eza --long --grid
.rw-rw-r-- 0 fie 21 Oct 19:57  1    .rw-rw-r-- 0 fie 21 Oct 19:57  3    .rw-rw-r-- 0 fie 21 Oct 19:57  5
.rw-rw-r-- 0 fie 21 Oct 19:57  2    .rw-rw-r-- 0 fie 21 Oct 19:57  4    .rw-rw-r-- 0 fie 21 Oct 19:57  6

Actual output:

❯ eza --long --grid --across
.rw-rw-r-- 0 fie 21 Oct 19:57  1    .rw-rw-r-- 0 fie 21 Oct 19:57  3    .rw-rw-r-- 0 fie 21 Oct 19:57  5
.rw-rw-r-- 0 fie 21 Oct 19:57  2    .rw-rw-r-- 0 fie 21 Oct 19:57  4    .rw-rw-r-- 0 fie 21 Oct 19:57  6
❯ eza --long --grid
.rw-rw-r-- 0 fie 21 Oct 19:57  1    .rw-rw-r-- 0 fie 21 Oct 19:57  3    .rw-rw-r-- 0 fie 21 Oct 19:57  5
.rw-rw-r-- 0 fie 21 Oct 19:57  2    .rw-rw-r-- 0 fie 21 Oct 19:57  4    .rw-rw-r-- 0 fie 21 Oct 19:57  6

I found that this is due to a hard-coded configuration in grid_details.rs - I've already adjusted the code to be flexible enough that the issue can be tested for.

Depending on how much progress I'll make in the remaining hour, I'll either be sharing a pull request with a fix, or one with the failing test only.

Wish me luck! 😊

Edit: Just submitted a PR that fixes this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    errorsSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions