Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Not-quite-alphabetic sorting: bug in Zsh or in Ubuntu?



% exec -c zsh -fc "HOME=$PWD SHELL=$SHELL TERM=$TERM PS1='%# ' exec Src/zsh -f"
% autoload compinit
% compinit
% zstyle '*' extra-verbose yes
% less<TAB>
less     -- opposite of more
lessecho -- expand metacharacters
lessfile -- "input preprocessor" for less.
lesskey  -- specify key bindings for less
lesspipe -- "input preprocessor" for less.
% LANG=en_US.UTF-8
% less<TAB>
lessecho -- expand metacharacters
lessfile -- "input preprocessor" for less.
lesskey  -- specify key bindings for less
less     -- opposite of more
lesspipe -- "input preprocessor" for less.

Without `$LANG`, the output is correctly sorted, but with
`LANG=en_US.UTF-8`, `less` somehow ends up in the wrong spot.

The problem occurs for me on Ubuntu, but not on macOS. Ergo, I suppose
this is a bug on the OS level?

On the other hand, it appears to affect only completion sorting:

% LANG=en_US.UTF-8
% touch lessecho lessfile lesskey lesspipe less
% print -l less*
less
lessecho
lessfile
lesskey
lesspipe
% rm less*
% tmp=( lessecho lessfile lesskey lesspipe less )
% print ${(o)tmp}
less lessecho lessfile lesskey lesspipe
%

These are all sorted just fine.




Messages sorted by: Reverse Date, Date, Thread, Author