Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Modify sort ordering for `ls`
- X-seq: zsh-workers 41569
- From: Daniel Li <dan@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Modify sort ordering for `ls`
- Date: Fri, 18 Aug 2017 13:32:59 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tubitv-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=C/c/N6pqm6lrXB/uX52aWDmA2Y+GsloGJZr8M+SCznA=; b=DYl4wd9Kk+uWe5TfXV4ehqOHPZSNMBlv0+eVW49d5ElAlMWLkp3FqF5OdmTON4Bt0S J6EnstMxyJyUeragleUTCmiNjpGZkYvETz77g4HpZBjPbTd/k1jZLi7r4iv2DovMagBw IpX+KEU2S/TQ+Fr4p9tRCglU1lGLg9G8mCAx21/aSseGR3aN3pmsSu4kW7R6134iBnHV SRhU4X3bGtBP9ssgqN1JHmj2CooM5dII0DmwA/NvDv4z3ELnb558lJL8VvJfitNrFUGg QV6piariexd4RzSwgQxqbtKgWpF5pOkhgaCEZKLhsPSj/lcpp+EjNuDa2U2zn8xRiyaM rxCA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author