zshrc: add the islinux() test before testing for ls -v switch
authorMoviuro <moviuro+grml@gmail.com>
Fri, 15 Jan 2016 06:35:14 +0000 (07:35 +0100)
committerMoviuro <moviuro+grml@gmail.com>
Fri, 15 Jan 2016 06:35:14 +0000 (07:35 +0100)
See https://github.com/grml/grml-etc-core/pull/55#issuecomment-171782089

etc/zsh/zshrc

index afcb5b7..9040369 100644 (file)
@@ -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