lsd-rs / lsd

The next gen ls command
Apache License 2.0
13.29k stars 431 forks source link

Lsd long output is not properly aligned #1063

Closed pwnalone closed 1 week ago

pwnalone commented 3 months ago

Expected behavior

The output should be properly aligned as it is with vanilla ls.

image

Actual behavior

The output is not aligned properly.

image

ehwan commented 3 months ago

I'm having same issue on OSX Terminal.app

But it worked good when I put --color=never.

image

image

zwpaper commented 3 months ago

is there any chance I can reproduce this?

ZNielsen commented 3 months ago

I'm also seeing this issue after installing via cargo install lsd. Uninstalling and installing via homebrew fixed the issue for me, so #1064 looks promising.

thomcc commented 3 months ago

I have this bug too, it reproduces easily macOS and Linux on every folder I've tried.

efvincent commented 2 months ago

same issue. version 1.1.2, installed today with

cargo install --git https://github.com/lsd-rs/lsd.git --branch master

KDE Neon (Ubuntu) 6.0 Plasma 6.1.2 KDE Framework 6.3.0 Qt 6.7 Kernel 6.5.0-41-generic 64bit Wayland

terminal: Kitty 0.21.2 font: Fira Code Nerd Font Mono Regular

msrd0 commented 2 months ago

@efvincent Add --locked to your command and the issue will go away

efvincent commented 2 months ago

@efvincent Add --locked to your command and the issue will go away

That did it... didn't notice the related issue that had the answer - thanks for pointing it out! 👍🏽

SamuelLarkin commented 2 months ago

Hi, just to add another data point. In my case I get the directories to be misaligned with the files or is it the other way around 😕

lsd --version
lsd 1.1.2
❯ lsd
.rw-r--r--    larkins larkins  10 KB Fri Jul  5 10:49:45 2024  dot_alias
.rw-rw----    larkins larkins 4.5 KB Tue Jul 16 12:15:09 2024  dot_bashrc.common
drwxr-xr-x larkins larkins 4.0 KB Fri Jul  5 10:49:45 2024  dot_cargo
drwxr-xr-x larkins larkins 4.0 KB Fri Jul  5 10:49:45 2024  dot_config
.rw-r--r--    larkins larkins  19 KB Tue Jul 16 12:11:09 2024  dot_gdbinit
.rw-r--r--    larkins larkins 8.3 KB Tue Jul 16 12:12:17 2024  dot_gitconfig
.rw-r--r--    larkins larkins 910 B  Fri Jul  5 10:49:45 2024  dot_gotz.config.json
.rw-r--r--    larkins larkins  52 B  Fri Jul  5 10:49:45 2024  dot_inputrc
.rw-r--r--    larkins larkins 1.3 KB Fri Jul  5 10:49:45 2024  dot_screenrc
.rw-r--r--    larkins larkins 125 B  Fri Jul  5 10:49:45 2024  dot_tigrc
.rw-r--r--    larkins larkins  13 KB Tue Jul 16 12:02:48 2024  dot_tmux.conf
.rw-r--r--    larkins larkins 967 B  Fri Jul  5 10:49:45 2024  dot_toprc
.rw-rw----    larkins larkins  17 KB Tue Jul 16 12:19:56 2024  dot_vimrc
.rw-rw----    larkins larkins 409 B  Fri Jul  5 15:38:28 2024  README.md

I recompiled the same version with --locked and the issue went away

❯ lsd
.rw-r--r-- larkins larkins  10 KB Fri Jul  5 10:49:45 2024  dot_alias
.rw-rw---- larkins larkins 4.5 KB Tue Jul 16 12:15:09 2024  dot_bashrc.common
drwxr-xr-x larkins larkins 4.0 KB Fri Jul  5 10:49:45 2024  dot_cargo
drwxr-xr-x larkins larkins 4.0 KB Fri Jul  5 10:49:45 2024  dot_config
.rw-r--r-- larkins larkins  19 KB Tue Jul 16 12:11:09 2024  dot_gdbinit
.rw-r--r-- larkins larkins 8.3 KB Tue Jul 16 12:12:17 2024  dot_gitconfig
.rw-r--r-- larkins larkins 910 B  Fri Jul  5 10:49:45 2024  dot_gotz.config.json
.rw-r--r-- larkins larkins  52 B  Fri Jul  5 10:49:45 2024  dot_inputrc
.rw-r--r-- larkins larkins 1.3 KB Fri Jul  5 10:49:45 2024  dot_screenrc
.rw-r--r-- larkins larkins 125 B  Fri Jul  5 10:49:45 2024  dot_tigrc
.rw-r--r-- larkins larkins  13 KB Tue Jul 16 12:02:48 2024  dot_tmux.conf
.rw-r--r-- larkins larkins 967 B  Fri Jul  5 10:49:45 2024  dot_toprc
.rw-rw---- larkins larkins  17 KB Tue Jul 16 12:19:56 2024  dot_vimrc
.rw-rw---- larkins larkins 409 B  Fri Jul  5 15:38:28 2024  README.md
pj-connect commented 1 month ago

Same issue here, as describes ehwan, in kitty 0.35.0 on Ubuntu 22.04. --locked not working. Built from source : lsd 1.1.3.

> .cargo/bin/lsd --locked
error: unexpected argument '--locked' found

  tip: a similar argument exists: '--blocks'

Usage: lsd <FILE|--all|--almost-all|--color <MODE>|--icon <MODE>|--icon-theme <THEME>|--classify|--long|--ignore-config|--config-file <PATH>|--oneline|--recursive|--human-readable|--tree|--depth <NUM>|--directory-only|--permission <MODE>|--size <MODE>|--total-size|--date <DATE>|--timesort|--sizesort|--extensionsort|--gitsort|--versionsort|--sort <TYPE>|--no-sort|--reverse|--group-dirs <MODE>|--group-directories-first|--blocks <BLOCKS>|--classic|--no-symlink|--ignore-glob <PATTERN>|--inode|--git|--dereference|--context|--hyperlink <MODE>|--header|--truncate-owner-after <NUM>|--truncate-owner-marker <STR>|--system-protected|--literal|--help>
msrd0 commented 1 month ago

@pj-connect --locked is a compile time flag, not a runtime flag

zwpaper commented 1 month ago

@pj-connect can you try the binary on github release page

zwpaper commented 1 month ago

I have merged https://github.com/lsd-rs/lsd/pull/1064, let's see if v1.1.5 helps

pj-connect commented 1 month ago

Nice. I simply compiled v1.1.5, seems to work fine. Did not do exhaustive testing, though. Let's see if it stands the test of time.

nc7s commented 1 month ago

FWIW, this might be https://github.com/unicode-rs/unicode-width/issues/55. Adding --locked uses its "locked" version, 0.1.11, which is before the problematic 0.1.13.

zwpaper commented 1 week ago

this should now be fixed in 1.1.5 /close

muniu-bot[bot] commented 1 week ago

@zwpaper: Closing this issue.

In response to [this](https://github.com/lsd-rs/lsd/issues/1063#issuecomment-2366720271): >this should now be fixed in 1.1.5 >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.