Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Width Option #128

Merged
merged 7 commits into from
Aug 13, 2023
Merged

Add Width Option #128

merged 7 commits into from
Aug 13, 2023

Conversation

gierens
Copy link
Member

@gierens gierens commented Aug 12, 2023

ls has a -w/--width option limiting the columns of the grid output. exa/eza only allows to specify the number of columns via the COLUMNS environment variable for some reason.

This adds the -w/--width option to the existing column limiting, meaning it behaves just like when specifying the COLUMNS variable, but with the ls-like command line argument. In case both COLUMNS and -w, then the cli option takes precedence.

The only difference to the -w option of ls is, that ls -w 0 sets the columns to infinity, while here it goes back to automatic width detection just as for the COLUMNS variable.

Resolves ogham/exa#1168

@cafkafk cafkafk self-requested a review August 13, 2023 03:03
Copy link
Member

@cafkafk cafkafk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • This needs to include completions for fish and zsh as far as I can tell.
  • This needs to conform to conventional commits

@cafkafk
Copy link
Member

cafkafk commented Aug 13, 2023

I'll help with the summaries, maybe the completions

Signed-off-by: Christina Sørensen <[email protected]>
Signed-off-by: Christina Sørensen <[email protected]>
Copy link
Member

@cafkafk cafkafk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After testing this a bit I found two bugs #129, #130, but neither are a flaw introduced by this PR. Guess that alone makes the case for this being a useful feature 😆

Testing seems to indicate this works as intended, and I like this addition a lot.

Thanks a lot for your contributions!

@cafkafk cafkafk merged commit 5a3ef7c into eza-community:main Aug 13, 2023
9 checks passed
@gierens
Copy link
Member Author

gierens commented Aug 13, 2023

I'll help with the summaries, maybe the completions

Ah great thank's :) ... When I skimmed the completion files they seemed kind of outdated, some flags missing, therefore I thought they are not maintained and skipped including the new option ... lazy me :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[REQUEST] Add columns option
2 participants