X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=1b051a5f8a51457b44760fb8968c2c5f9063de17;hb=0731b9ef086b033b52fafd94a27b7daad6942b4b;hp=9ce49ca6cb6f7b9c42561d0456f5a166d8c10003;hpb=e8f18fbb19cc077695c7a3308654830702fb316a;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 9ce49ca..1b051a5 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -180,14 +180,22 @@ else isgrmlsmall() { return 1 } fi +GRML_OSTYPE=$(uname -s) + +islinux(){ + [[ $GRML_OSTYPE == "Linux" ]] +} + isdarwin(){ - [[ $OSTYPE == darwin* ]] && return 0 - return 1 + [[ $GRML_OSTYPE == "Darwin" ]] } isfreebsd(){ - [[ $OSTYPE == freebsd* ]] && return 0 - return 1 + [[ $GRML_OSTYPE == "FreeBSD" ]] +} + +isopenbsd(){ + [[ $GRML_OSTYPE == "OpenBSD" ]] } #f1# are we running within an utf environment? @@ -350,8 +358,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