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

File list is totally vertical if the list doesn't fit into one line unless run with -a #1014

Closed
Un1q32 opened this issue Mar 22, 2024 · 10 comments
Assignees

Comments

@Un1q32
Copy link
Contributor

Un1q32 commented Mar 22, 2024

Expected behavior

Wrapping behavior should be the same as 1.0.0, or the same as when run with -a

Actual behavior

Screenshot 2024-03-22 at 5 29 28 PM

Zooming in shows a normal run can also have this problem if one line isnt enough to fit

Screenshot 2024-03-22 at 5 30 40 PM
@wwwjfy
Copy link

wwwjfy commented Mar 23, 2024

It seems -a doesn't matter (much) here.
My observation is if non-. items cannot fit in one line, it'll show one item per line.

In the above case non-. items are not many, so even though with both it's wider than one line, it still behaves as expected.

I'm using iTerm2. This is new in the last release.

@nogweii
Copy link

nogweii commented Mar 23, 2024

  • lsd --version: lsd 1.1.1
  • echo $TERM: xterm-kitty
  • Arch Linux

Running into the same issue.

I've aliased ls to /usr/bin/lsd --icon=auto --color=auto -F, and indeed adding -a will make files wrap as expected.

@zwpaper
Copy link
Member

zwpaper commented Mar 23, 2024

it was introduced because we upgraded the term_grid = "0.1.*" dependency to the newer version, let me have a look at it.

@zwpaper zwpaper self-assigned this Mar 23, 2024
@oneElectron
Copy link

I am also having this issue.

  • lsd --version: lsd 1.1.1
  • echo $TERM: alacritty
  • MacOS 14.4

@FischLu
Copy link

FischLu commented Mar 23, 2024

I have the same issue

  • lsd --version: lsd 1.1.1
  • echo $TERM: xterm-256color
  • MacOS 14.4

@nogweii
Copy link

nogweii commented Mar 24, 2024

Hm, I think I've found the root cause - term_grid doesn't ignore ANSI codes when calculating the width of each entry. That could be tricky to solve...

EDIT: Ah, actually there's a more maintained fork of the library at https://github.com/uutils/uutils-term-grid ! And it does properly ignore ANSI codes.

@CarloCattano
Copy link

came here looking for others having the same.
lsd 1.1.1

ls returns a vertical list of files if the size cant hold them all in one line

@zwpaper
Copy link
Member

zwpaper commented Mar 25, 2024

I decided to rollback the term_grid dependency and we can later discuss which version or libs we should upgrade to.

#1019, after this one is merged, I will release a v1.1.2 to do a quick fix.

sorry for the bothering, I was kinda busy recently, but this should not be an excuse

@zwpaper
Copy link
Member

zwpaper commented Mar 25, 2024

as now https://github.com/lsd-rs/lsd/releases/tag/v1.1.2 released, this would be close
/close

@muniu-bot muniu-bot bot closed this as completed Mar 25, 2024
Copy link

muniu-bot bot commented Mar 25, 2024

@zwpaper: Closing this issue.

In response to this:

as now https://github.com/lsd-rs/lsd/releases/tag/v1.1.2 released, this would be close
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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

No branches or pull requests

7 participants