From 8a6d0b76391dbec475293833d09b398ddad84e9a Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 22 Mar 2009 10:57:53 +0100 Subject: zshrc: Do nothing except including files --- etc/cleanup | 9 +++++++++ etc/misc | 6 ++++++ etc/osdetect | 11 +++++++++++ etc/rc | 35 ++++------------------------------- etc/rc_status | 7 +++++++ 5 files changed, 37 insertions(+), 31 deletions(-) create mode 100644 etc/cleanup create mode 100644 etc/misc create mode 100644 etc/osdetect create mode 100644 etc/rc_status diff --git a/etc/cleanup b/etc/cleanup new file mode 100644 index 0000000..834f6b0 --- /dev/null +++ b/etc/cleanup @@ -0,0 +1,9 @@ +## vim:ft=zsh +# cleanup +echo -n "\r\e[2K" +unalias 'linux:' +unalias 'openbsd:' +unfunction zrc_status zrc_info +unfunction xexport xsource +unset system distro +unset ps_fail ps_green ps_info ps_red ps_reset ps_yellow diff --git a/etc/misc b/etc/misc new file mode 100644 index 0000000..2343c07 --- /dev/null +++ b/etc/misc @@ -0,0 +1,6 @@ +## vim:ft=zsh +# misc +check_com -c dircolors && eval $(dircolors -b $ZDIR/dircolors) +mesg n +umask 077 +chpwd diff --git a/etc/osdetect b/etc/osdetect new file mode 100644 index 0000000..91a7c8a --- /dev/null +++ b/etc/osdetect @@ -0,0 +1,11 @@ +## vim:ft=zsh +# for system-specific setup +system=${$(uname):l} +alias 'linux:'='[[ $system == linux ]] &&' +alias 'openbsd:'='[[ $system == openbsd ]] &&' +if [[ $system == linux ]] { + [[ -f /etc/debian_version ]] && distro=debian + [[ -f /etc/gentoo-release ]] && distro=gentoo + [[ -f /etc/arch-release ]] && distro=arch + [[ -f /etc/redhat-release ]] && distro=redhat +} diff --git a/etc/rc b/etc/rc index 266ee41..ef705b6 100644 --- a/etc/rc +++ b/etc/rc @@ -6,22 +6,8 @@ ## https://derf.homelinux.org/~derf/dotfiles/zsh/rc ## see also: https://derf.homelinux.org/~derf/dotfiles/zsh/ -# for system-specific setup -system=${$(uname):l} -alias 'linux:'='[[ $system == linux ]] &&' -alias 'openbsd:'='[[ $system == openbsd ]] &&' -if [[ $system == linux ]] { - [[ -f /etc/debian_version ]] && distro=debian -} - -function zrc_status { - echo -n "\r\e[2K\e[0;36m--\e[0m $*" -} -function zrc_info { - echo "\e[0;36m--\e[0m $*" -} - -# include the actual config +source $ZDIR/osdetect +source $ZDIR/rc_status source $ZDIR/options source $ZDIR/parameters source $ZDIR/function @@ -30,6 +16,7 @@ source $ZDIR/prompt source $ZDIR/directories source $ZDIR/keys source $ZDIR/alias +source $ZDIR/misc zrc_status "includes" source $ZDIR/../provided/includes @@ -38,18 +25,4 @@ xsource $HOME/var/tmp/envstore-raw-$UID # envstore xsource $ZDIR/hosts/$HOST # local configuration in git source $ZDIR/completion - -# misc -check_com -c dircolors && eval $(dircolors -b $ZDIR/dircolors) -mesg n -umask 077 -chpwd - -# cleanup -echo -n "\r\e[2K" -unalias 'linux:' -unalias 'openbsd:' -unfunction zrc_status zrc_info -unfunction xexport xsource -unset system distro -unset ps_fail ps_green ps_info ps_red ps_reset ps_yellow +source $ZDIR/cleanup diff --git a/etc/rc_status b/etc/rc_status new file mode 100644 index 0000000..58e6f53 --- /dev/null +++ b/etc/rc_status @@ -0,0 +1,7 @@ +## vim:ft=zsh +function zrc_status { + echo -n "\r\e[2K\e[0;36m--\e[0m $*" +} +function zrc_info { + echo "\e[0;36m--\e[0m $*" +} -- cgit v1.2.3