diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-03-22 10:57:53 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-03-22 10:57:53 +0100 |
commit | 8a6d0b76391dbec475293833d09b398ddad84e9a (patch) | |
tree | 916b2d1273f5f480ba7708c1632f8b2b48566171 | |
parent | 3aa9e5592a0f44c05f60313fdca62328900f7ea5 (diff) |
zshrc: Do nothing except including files
-rw-r--r-- | etc/cleanup | 9 | ||||
-rw-r--r-- | etc/misc | 6 | ||||
-rw-r--r-- | etc/osdetect | 11 | ||||
-rw-r--r-- | etc/rc | 35 | ||||
-rw-r--r-- | etc/rc_status | 7 |
5 files changed, 37 insertions, 31 deletions
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 +} @@ -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 $*" +} |