projects
/
grml-etc-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
zshrc: test if ls is GNU ls instead of islinux()
[grml-etc-core.git]
/
etc
/
zsh
/
zshrc
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
9040369
..
a09361c
100644
(file)
--- 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