uutils / coreutils

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

ls: --l should output the same as --literal #5025

Closed cakebaker closed 1 year ago

cakebaker commented 1 year ago

GNU ls uses ls --l as a shortcut for --literal:

$ ls --l
aa.txt  foo.8b79  foo.eWmR  hello.txt  test_dir

$ ls --literal
aa.txt  foo.8b79  foo.eWmR  hello.txt  test_dir

uutils ls, on the other hand, uses ls --l as a shortcut for --long (our extension to GNU ls):

$ cargo run ls --l
total 12
-rw-r--r-- 1 dho dho    2 Apr 10 16:04 aa.txt
-rw------- 1 dho dho    0 May 16 09:31 foo.8b79
-rw------- 1 dho dho    0 May 16 09:22 foo.eWmR
-rw-r--r-- 1 dho dho   12 Jun 21 14:51 hello.txt
drwxr-xr-x 2 dho dho 4096 Jun 21 11:54 test_dir

$ cargo run ls --literal
aa.txt  foo.8b79  foo.eWmR  hello.txt  test_dir
tertsdiepraam commented 1 year ago

@cakebaker, what is your preferred solution here? Should we remove --long?

cakebaker commented 1 year ago

I don't have a preferred solution here and the proposed solution in the PR looks good to me.

I think we should make the decision whether to remove --long independent of this issue. And because it is tested and documented, I tend to keep it.

tertsdiepraam commented 1 year ago

I was thinking it's a bit confusing as it is now with the workaround. But I do like having --long too, so I guess we'll keep it for now.