From: Moviuro Date: Sun, 17 Jan 2016 06:45:23 +0000 (+0100) Subject: zshrc: test if ls is GNU ls instead of islinux() X-Git-Tag: v0.15.0~4^2 X-Git-Url: https://git.grml.org/?p=grml-etc-core.git;a=commitdiff_plain;h=1fa194ecab5c43405e800d81f1f6ba5e1fa68049 zshrc: test if ls is GNU ls instead of islinux() --- diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 9040369..a09361c 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -442,7 +442,7 @@ fi # Natural sorting order on GNU ls(1) # OSX and IllumOS have a -v option that is not natural sorting -if islinux && ls -v / >/dev/null 2>&1; then +if ls --version |& grep -q 'GNU' >/dev/null 2>&1 && ls -v / >/dev/null 2>&1; then ls_options+=( -v ) fi