uutils / coreutils

Cross-platform Rust rewrite of the GNU coreutils
https://uutils.github.io/
MIT License
17.24k stars 1.24k forks source link

ls: --dired -R output error #6522

Closed CausingBrick closed 23 hours ago

CausingBrick commented 4 days ago

I found the output of uu_ls is not same as GNU ls.

$ mkdir -p /tmp/example/a 

# GNU ls
$ ls -D /tmp/example -R
  /tmp/example:
  total 4
  drwxr-xr-x 2 causingbrick causingbrick 4096 Jul  2 00:59 a

  /tmp/example/a:
  total 0
//DIRED// 85 86
//SUBDIRED// 2 14 90 104
//DIRED-OPTIONS// --quoting-style=shell-escape

# uu_ls
$ cargo r -p  uu_ls -- -D /tmp/example/ -R
  /tmp/example/:
  total 4
  drwxr-xr-x 2 causingbrick causingbrick 4096 07-02 00:59 a

  /tmp/example/a:
  total 0
//SUBDIRED// 2 15 90 104
//DIRED-OPTIONS// --quoting-style=literal

Not same:

  1. The date properties of dir
  2. uu_ls miss one line output and the numbers followed by like SUBDIRED

I'm not familiar with Emacs' dired mode, I'll try to read info or man later to figure out what these mean. 🤣

sylvestre commented 4 days ago

with which version of the rust coreutils ? :)

CausingBrick commented 4 days ago

with which version of the rust coreutils ? :)

The current main branch 4720f8a076efec272e5d19c5d2a52e5c57e449da is still reproducible:

➜ git rev-parse HEAD        
4720f8a076efec272e5d19c5d2a52e5c57e449da
coreutils on  main [!] via 🦀 v1.81.0-nightly 
➜ cargo r -p  uu_ls -- -D /tmp/example/ -R
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.06s
     Running `target/debug/ls -D /tmp/example/ -R`
  /tmp/example/:
  total 4
  drwxr-xr-x 2 causingbrick causingbrick 4096 07-02 00:59 a

  /tmp/example/a:
  total 0
//SUBDIRED// 2 15 90 104
//DIRED-OPTIONS// --quoting-style=literal

➜ ls --version
ls (GNU coreutils) 9.5
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Richard M. Stallman and David MacKenzie.
pyoky commented 2 days ago

I'll get working on this.