lsd icon indicating copy to clipboard operation
lsd copied to clipboard

Sort dot files without the leading dot

Open bofh69 opened this issue 6 years ago • 5 comments

A directory with .b and a could be shown with lsd -A as: a .b instead of the current .b a

bofh69 avatar Apr 16 '19 09:04 bofh69

Hi @bofh69 ,

Thanks for the report. This seems to be the same behavior than the classic ls and we try to keep the behavior a similar as possible. That said I think that you can solve this issue with the option --group-dirs first

Peltoche avatar Apr 17 '19 13:04 Peltoche

Hello @Peltoche ! "--group-dirs first" does not do the same thing. In my example a and .b could either be files or dirs and they will always be sorted as "a .b" with ls -A

bofh69 avatar Apr 18 '19 19:04 bofh69

Hey @bofh69 , I personally think we should keep the current behaviour as it is similar to the behaviour of ls.

meain avatar Apr 19 '19 05:04 meain

I understand the desire to sort files by names ignoring leading dots, but I don't think this should be the default -- for the reasons specified above.

I can see a strong case to be made for supporting this through an optional environment setting or argument on the command-line, however.

bknowles avatar Jul 31 '19 18:07 bknowles

@bknowles as was discussed in the PR, the default is locale dependant.

I think it would be better to wait until Rust has better l10n support before changing this instead of having an environment setting for it

bofh69 avatar Aug 02 '19 08:08 bofh69