From: Daniel Li <dan@tubitv.com>
To: zsh-workers@zsh.org
Subject: Modify sort ordering for `ls`
Date: Fri, 18 Aug 2017 13:32:59 -0700 [thread overview]
Message-ID: <CAN_nDg6OHXswqwes9zgFsMPPXecXNSeqM77D4fOsPG1FesgE=g@mail.gmail.com> (raw)
[-- 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
next reply other threads:[~2017-08-18 20:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-18 20:32 Daniel Li [this message]
2017-08-18 20:34 ` Daniel Li
2017-08-18 20:44 ` Phil Pennock
2017-08-18 22:24 ` Daniel Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAN_nDg6OHXswqwes9zgFsMPPXecXNSeqM77D4fOsPG1FesgE=g@mail.gmail.com' \
--to=dan@tubitv.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).