projects
/
grml-etc-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Actually check that grep options exist before adding them to the alias.
[grml-etc-core.git]
/
etc
/
zsh
/
zshrc
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
9ce49ca
..
295e55d
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-350,8
+350,7
@@
if ls --color=auto / >/dev/null 2>&1; then
elif ls -G / >/dev/null 2>&1; then
ls_options=( -G )
fi
-if grep --help 2> /dev/null | grep -q GNU || \
- [[ $OSTYPE == freebsd* ]]; then
+if grep --color=auto -q "a" <<< "a"; then
grep_options=( --color=auto )
fi