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
(from parent 1:
f3cf1fd
)
zshrc: Enable ls(1)'s natural sorting if available
author
Moviuro
<moviuro+grml@gmail.com>
Thu, 14 Jan 2016 20:56:50 +0000
(21:56 +0100)
committer
Moviuro
<moviuro+grml@gmail.com>
Thu, 14 Jan 2016 20:56:50 +0000
(21:56 +0100)
etc/zsh/zshrc
patch
|
blob
|
history
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
c021c87
..
451b5dd
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-436,6
+436,12
@@
if ls --color=auto / >/dev/null 2>&1; then
elif ls -G / >/dev/null 2>&1; then
ls_options+=( -G )
fi
+
+# Natural sorting order on GNU ls(1)
+if ls -v / >/dev/null 2>&1; then
+ ls_options+=( -v )
+fi
+
if grep --color=auto -q "a" <<< "a" >/dev/null 2>&1; then
grep_options+=( --color=auto )
fi