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

ls: strange --classify output #6897

Open
sanpii opened this issue Nov 28, 2024 · 4 comments
Open

ls: strange --classify output #6897

sanpii opened this issue Nov 28, 2024 · 4 comments
Labels

Comments

@sanpii
Copy link
Contributor

sanpii commented Nov 28, 2024

Actual:
Image

Expected:
Image

$ uu-ls -F tests/fixtures/
base32/ cat/    cksum/  cp/     cut/    dircolors/      env/    fmt/    hashsum/        install/        mv/     nohup/  od/     pr/     shuf/   split/  tac/    test/ unexpand/        uptime/ util/
base64/ chgrp/  comm/   csplit/ dd/     du/             expand/ fold/   head/           join/           nl/     numfmt/ paste/  ptx/    sort/   sum/    tail/   tsort/uniq/            users/  wc/
$ \ls -F tests/fixtures/
base32/  chgrp/  cp/      dd/         env/     fold/     install/  nl/      od/     ptx/   split/  tail/   unexpand/  users/
base64/  cksum/  csplit/  dircolors/  expand/  hashsum/  join/     nohup/   paste/  shuf/  sum/    test/   uniq/      util/
cat/     comm/   cut/     du/         fmt/     head/     mv/       numfmt/  pr/     sort/  tac/    tsort/  uptime/    wc/
$ uu-ls -V
uu-ls 0.0.28
$ $TERM -V
wezterm 20240203-110809-5046fc22
@sylvestre
Copy link
Contributor

please replace screenshots by code. They are terrible for accessibility (ex: i might have visual impairment) and search.
thanks

@sanpii
Copy link
Contributor Author

sanpii commented Nov 28, 2024

@sylvestre The text version is not exactly the same

@sylvestre
Copy link
Contributor

thanks. I updated comment 0

@rm-dr
Copy link

rm-dr commented Dec 1, 2024

Looks like this is a result of fd2c4a1. Using tabs as an alignment character confuses the alignment code in term-grid, which treats \t as a character that is one column wide. This results in lines with an effective length that exceeds the width of the terminal.

We could fix this temporarily with https://github.com/rm-dr/coreutils/tree/ls-only-spaces, then resolve the underlying tab problem by finishing (or restarting, it's been more than a year) uutils/uutils-term-grid#24?

Related:

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

No branches or pull requests

3 participants