lsd icon indicating copy to clipboard operation
lsd copied to clipboard

Does not honor LC_COLLATE or LANG

Open kenyoni opened this issue 3 years ago • 3 comments

  • os: Linux 5.14.21-2-MANJARO SMP PREEMPT Sun Nov 21 22:43:47 UTC 2021 x86_64 GNU/Linux
  • lsd --version: 0.20.1
  • echo $TERM: xterm-256color
  • echo $LS_COLORS:

Expected behavior

When LC_COLLATE=C or LANG=C, filenames should be sorted in ASCII order. (upper before lowercase filenames)

Actual behavior

When LC_COLLATE=C, or LANG=C, filenames are still sorted using en_US.UTF-8 where case makes no difference.

kenyoni avatar Jan 09 '22 10:01 kenyoni

related https://github.com/Peltoche/lsd/issues/50

zwpaper avatar Jan 10 '22 06:01 zwpaper

Further to the above, when locale/LC_COLLATE is set to en_US.UTF-8 or en_AU.UTF-8 (my locale), GNU ls behavior is to ignore the leading dot for hidden files/directories when sorting the output.

I prefer this way of sorting so lsd respecting locale would be ideal for me

Related to https://github.com/Peltoche/lsd/issues/187

all64bits avatar Aug 08 '22 20:08 all64bits

is this thread confirming that --date parameter is not accepting "+%x" as should display date in OS's locale setting, which lsd is only displaying as like LC_ALL=C?

which in my case, I had to write "year" "month" "day" in my own language, as like: 2023年2月22日 e.g.

date: "+%Y年%m月%d日 %H:%M"

in ~/.config/lsd/config.yaml

LeisureLinux avatar Feb 25 '23 01:02 LeisureLinux