From: Moviuro Date: Thu, 14 Jan 2016 20:56:50 +0000 (+0100) Subject: zshrc: Enable ls(1)'s natural sorting if available X-Git-Tag: v0.15.0~4^2~3 X-Git-Url: http://git.grml.org/?p=grml-etc-core.git;a=commitdiff_plain;h=b78f11c674d58383a4be2188f53a9f6a5d050320 zshrc: Enable ls(1)'s natural sorting if available --- diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index c021c87..451b5dd 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -436,6 +436,12 @@ if ls --color=auto / >/dev/null 2>&1; then elif ls -G / >/dev/null 2>&1; then ls_options+=( -G ) fi + +# Natural sorting order on GNU ls(1) +if ls -v / >/dev/null 2>&1; then + ls_options+=( -v ) +fi + if grep --color=auto -q "a" <<< "a" >/dev/null 2>&1; then grep_options+=( --color=auto ) fi