Skip to content

Commit

Permalink
zshrc: updated OS recognition functions
Browse files Browse the repository at this point in the history
TODO: add more to the list (e.g. *BSDs, Solaris...)
  • Loading branch information
moviuro authored and ft committed Sep 15, 2014
1 parent dffa817 commit 0731b9e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions etc/zsh/zshrc
Expand Up @@ -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?
Expand Down

0 comments on commit 0731b9e

Please sign in to comment.