lsd-rs / lsd

The next gen ls command
Apache License 2.0
13.06k stars 425 forks source link

Sort dot files without the leading dot #187

Open bofh69 opened 5 years ago

bofh69 commented 5 years ago

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

Peltoche commented 5 years ago

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

bofh69 commented 5 years ago

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

meain commented 5 years ago

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

bknowles commented 5 years ago

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.

bofh69 commented 5 years ago

@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