projects
/
grml-etc-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c06666b
)
zshrc: test if ls is GNU ls instead of islinux()
author
Moviuro
<moviuro+grml@gmail.com>
Sun, 17 Jan 2016 06:45:23 +0000
(07:45 +0100)
committer
Moviuro
<moviuro+grml@gmail.com>
Sun, 17 Jan 2016 06:45:23 +0000
(07:45 +0100)
etc/zsh/zshrc
patch
|
blob
|
history
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