From 05fd0d5f681ea378caed7a65c5d353604aae5ed0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 8 Jan 2009 13:51:59 +0100 Subject: zshrc: slightly changed the OS detection --- etc/rc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'etc/rc') 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 -- cgit v1.2.3