From: Moviuro Date: Fri, 15 Jan 2016 06:35:14 +0000 (+0100) Subject: zshrc: add the islinux() test before testing for ls -v switch X-Git-Tag: v0.15.0~4^2~1 X-Git-Url: https://git.grml.org/?p=grml-etc-core.git;a=commitdiff_plain;h=c06666be9d5039d97f346264c0c7b4aca74fe23f zshrc: add the islinux() test before testing for ls -v switch See https://github.com/grml/grml-etc-core/pull/55#issuecomment-171782089 --- diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index afcb5b7..9040369 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -441,7 +441,8 @@ elif ls -G / >/dev/null 2>&1; then fi # Natural sorting order on GNU ls(1) -if ls -v / >/dev/null 2>&1; then +# OSX and IllumOS have a -v option that is not natural sorting +if islinux && ls -v / >/dev/null 2>&1; then ls_options+=( -v ) fi