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:
3680c71
)
Actually check that ls options exist before adding them to the alias.
author
Moviuro
<moviuro+grml@gmail.com>
Thu, 11 Sep 2014 20:40:09 +0000
(22:40 +0200)
committer
Frank Terbeck
<ft@grml.org>
Thu, 11 Sep 2014 21:02:43 +0000
(23:02 +0200)
etc/zsh/zshrc
patch
|
blob
|
history
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
9657c72
..
9ce49ca
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-345,9
+345,9
@@
ZSH_NO_DEFAULT_LOCALE=${ZSH_NO_DEFAULT_LOCALE:-0}
typeset -ga ls_options
typeset -ga grep_options
-if ls --
help 2> /dev/null | grep -q GNU
; then
+if ls --
color=auto / >/dev/null 2>&1
; then
ls_options=( --color=auto )
-elif
[[ $OSTYPE == freebsd* ]]
; then
+elif
ls -G / >/dev/null 2>&1
; then
ls_options=( -G )
fi
if grep --help 2> /dev/null | grep -q GNU || \