lsd icon indicating copy to clipboard operation
lsd copied to clipboard

Lsd long output is not properly aligned

Open pwnalone opened this issue 1 year ago • 14 comments

  • os: Linux kali 6.6.15-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.6.15-2kali1 (2024-05-17) x86_64 GNU/Linux (also observed on Ubuntu under WSL)
  • lsd --version: 1.1.2 (also observed with 1.0.0)
  • echo $TERM: tmux-256color (also observed with alacritty)
  • echo $LS_COLORS: (empty)

Expected behavior

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

image

Actual behavior

The output is not aligned properly.

image

pwnalone avatar Jun 16 '24 19:06 pwnalone

I'm having same issue on OSX Terminal.app

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

image

image

ehwan avatar Jun 18 '24 13:06 ehwan

is there any chance I can reproduce this?

zwpaper avatar Jun 22 '24 03:06 zwpaper

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.

ZNielsen avatar Jun 25 '24 16:06 ZNielsen

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

thomcc avatar Jul 06 '24 04:07 thomcc

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

efvincent avatar Jul 15 '24 00:07 efvincent

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

msrd0 avatar Jul 15 '24 07:07 msrd0

@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! 👍🏽

efvincent avatar Jul 16 '24 11:07 efvincent

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

SamuelLarkin avatar Jul 16 '24 16:07 SamuelLarkin

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>

pj-connect avatar Aug 20 '24 00:08 pj-connect

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

msrd0 avatar Aug 20 '24 05:08 msrd0

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

zwpaper avatar Aug 20 '24 15:08 zwpaper

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

zwpaper avatar Aug 20 '24 16:08 zwpaper

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.

pj-connect avatar Aug 21 '24 18:08 pj-connect

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.

nc7s avatar Aug 29 '24 11:08 nc7s

this should now be fixed in 1.1.5 /close

zwpaper avatar Sep 22 '24 10:09 zwpaper

@zwpaper: Closing this issue.

In response to this:

this should now be fixed in 1.1.5 /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.

muniu-bot[bot] avatar Sep 22 '24 10:09 muniu-bot[bot]