summaryrefslogtreecommitdiff
path: root/etc/rc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-01-08 13:51:59 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2009-01-08 13:51:59 +0100
commit05fd0d5f681ea378caed7a65c5d353604aae5ed0 (patch)
tree4aab935ea656ad23c467661c7fcae3869897d821 /etc/rc
parentd22a9c93c70bc63b69152394c1dbda74a01c373c (diff)
zshrc: slightly changed the OS detection
Diffstat (limited to 'etc/rc')
-rw-r--r--etc/rc13
1 files changed, 8 insertions, 5 deletions
diff --git a/etc/rc b/etc/rc
index 2031a07..b1dd892 100644
--- a/etc/rc
+++ b/etc/rc
@@ -6,10 +6,13 @@
## https://derf.homelinux.org/~derf/dotfiles/zsh/rc
## see also: https://derf.homelinux.org/~derf/dotfiles/zsh/
-## mostly internal stuff
-uname=$(uname)
-alias 'linux:'='[[ $uname = Linux ]] &&'
-alias 'openbsd:'='[[ $uname = OpenBSD ]] &&'
+## What are we running on?
+system=${$(uname):l}
+alias 'linux:'='[[ $system == linux ]] &&'
+alias 'openbsd:'='[[ $system == openbsd ]] &&'
+if [[ $system == linux ]] {
+ [[ -f /etc/debian_version ]] && distro=debian
+}
## include the actual config
source $ZDIR/options
@@ -44,5 +47,5 @@ unalias 'openbsd:'
unfunction check_com
unfunction xexport
unfunction xsource
-unset uname
+unset system distro
unset ps_fail ps_green ps_info ps_red ps_reset ps_yellow