zsh-workers
 help / color / mirror / code / Atom feed
* Modify sort ordering for `ls`
@ 2017-08-18 20:32 Daniel Li
  2017-08-18 20:34 ` Daniel Li
  2017-08-18 20:44 ` Phil Pennock
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Li @ 2017-08-18 20:32 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 1070 bytes --]

Hi all,

I noticed on Mac, ls -l sorts a dot (.) before alphanumerics, which I
consider to be correct for purposes of tab completion:

-rw-r--r--  1 dan  dan  0B Aug 18 13:20 VeryLongFileName.scala
-rw-r--r--  1 dan  dan  0B Aug 18 13:20 VeryLongFileNameHelper.scala

Whereas on Ubuntu, ls -l gives the reverse:

-rw-rw-r-- 1 ubuntu ubuntu 0 Aug 18 13:22 VeryLongFileNameHelper.scala
-rw-rw-r-- 1 ubuntu ubuntu 0 Aug 18 13:22 VeryLongFileName.scala

On the flip side, Zsh on Mac sorts a dot after a dash (-), which for
purposes of tab completion feels unnatural:

-rw-r--r--  1 dan  dan  0B Aug 18 13:22 data-extra.bin
-rw-r--r--  1 dan  dan  0B Aug 18 13:22 data.bin

On Ubuntu, this behavior is again reversed:

-rw-rw-r-- 1 ubuntu ubuntu 0 Aug 18 13:22 data.bin
-rw-rw-r-- 1 ubuntu ubuntu 0 Aug 18 13:22 data-extra.bin

Is it possible to manually specify (say, in .zshrc or an LS_* env var) the
sort ordering? If not, can this feature be added?

Regards,

Daniel Li

*Daniel Li*
Senior Backend Engineer at Tubi TV

560 Mission St, Suite 1301

San Francisco, CA 94105

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-18 22:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-18 20:32 Modify sort ordering for `ls` Daniel Li
2017-08-18 20:34 ` Daniel Li
2017-08-18 20:44 ` Phil Pennock
2017-08-18 22:24   ` Daniel Li

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).