summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-06-07 00:50:51 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-06-07 00:50:51 +0200
commit25a4b62dc55a36f80edc926746f01553bf8a245b (patch)
treee734746327d282d9871b925f846b8003aa187439
parent1ae1f754c4312a77ba6e94dc5c9d65778ad0c8f9 (diff)
finished the linux: stuff
-rw-r--r--etc/alias/default14
-rw-r--r--etc/completion2
-rw-r--r--etc/rc50
3 files changed, 22 insertions, 44 deletions
diff --git a/etc/alias/default b/etc/alias/default
index 637786c..10dd8ea 100644
--- a/etc/alias/default
+++ b/etc/alias/default
@@ -5,18 +5,18 @@
alias cp='cp -i'
# The free/used/total space of encfs type filesystems is broken here
-[ $uname = Linux ] && alias df='df --human-readable --local --exclude-type=fuse.encfs' || alias df='df -hl'
+linux: alias df='df --human-readable --local --exclude-type=fuse.encfs' || alias df='df -hl'
-[ $uname = Linux ] && alias du='du --human-readable --summarize --dereference-args' || alias du='du -sh'
+linux: alias du='du --human-readable --summarize --dereference-args' || alias du='du -sh'
alias feh='feh --quiet'
-[ $uname = Linux ] && alias fgrep='grep -F --color=auto'
+linux: alias fgrep='grep -F --color=auto'
# find does globbing itself
alias find='noglob find'
-[ $uname = Linux ] && alias grep='grep --color=auto'
+linux: alias grep='grep --color=auto'
alias host='host -a'
@@ -29,10 +29,10 @@ alias ifconfig='/sbin/ifconfig'
export LESS='--silent --clear-screen --RAW-CONTROL-CHARS --quit-if-one-screen --ignore-case --tabs=5'
# classify = "/" after dirs, "*" after executables etc
-[ $uname = Linux ] && alias ls='ls --color=auto --classify --human-readable' || alias ls='ls -Fh'
+linux: alias ls='ls --color=auto --classify --human-readable' || alias ls='ls -Fh'
# Somehow folllowing the 'learn something new every day' ;-)
-[ $uname = Linux ] && alias man='man --all' || alias man='man -a'
+linux: alias man='man --all' || alias man='man -a'
# Useful on sshfs or similar
alias mplayer='mplayer -cache 6000 -cache-min 50'
@@ -42,7 +42,7 @@ alias mv='mv -i'
alias mx='mx -aZ'
# Only TCP/TCP6, not sockets and such
-[ $uname = Linux ] && alias netstat='sudo netstat --program --listening --all --tcp --extend' || alias netstat='sudo netstat -latp tcp'
+linux: alias netstat='sudo netstat --program --listening --all --tcp --extend' || alias netstat='sudo netstat -latp tcp'
# BSD style
alias ps='ps aux'
diff --git a/etc/completion b/etc/completion
index 9a1f84f..f3d0141 100644
--- a/etc/completion
+++ b/etc/completion
@@ -1,6 +1,6 @@
## vim:ft=zsh
-[ $uname = Linux ] && zstyle ':completion:*' list-colors $(dircolors $HOME/packages/zsh/etc/dircolors | head -n 1 | sed -r 's/LS_COLORS=|;$//g')
+linux: zstyle ':completion:*' list-colors $(dircolors $HOME/packages/zsh/etc/dircolors | head -n 1 | sed -r 's/LS_COLORS=|;$//g')
# Mark the current selection when tabbing through possible completions
zstyle ':completion:*' menu select=1
# Also complete uppercase names with lowercase
diff --git a/etc/rc b/etc/rc
index 727e24d..2a1fec2 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,43 +1,14 @@
## vim:ft=zsh
-autoload -Uz compinit
-autoload colors
-autoload zargs
-compinit -C
-colors
-bindkey -e # EMACS bindings
-zstyle :compinstall filename "$HOME/.zshrc"
-
-## zsh vars
-HISTFILE=~/.histfile
-HISTSIZE=10000
-SAVEHIST=$HISTSIZE
-DIRSTACKSIZE=20
+## internal stuff
ZDIR=$HOME/packages/zsh/etc
uname=$(uname)
-
-## internal aliases
alias 'linux:'='[ $uname = Linux ] &&'
alias 'openbsd:'='[ $uname = OpenBSD ] &&'
-## other vars
-export PATH=$HOME/bin:$PATH
-export EDITOR==vim
-export MPD_HOST=saviour
-linux: export LANG=en_US.UTF-8
-openbsd: export PKG_PATH="ftp://ftp.freenet.de/pub/ftp.openbsd.org/pub/OpenBSD/`uname -r`/packages/`machine -a`/:ftp://openbsd.ftp.fu-berlin.de/pub/OpenBSD/`uname -r`/packages/`machine -a`/"
-export HOST
-linux: [ -z "$MANPATH" ] && export MANPATH=$(manpath):$HOME/packages/.collected/man
-
-# Fancy directory colors
-linux: eval $(dircolors -b $HOME/packages/zsh/etc/dircolors)
-
-## Host completion
-_hosts() { compadd alpha beta gamma kraftwerk delta epsilon zeta eta saviour theta iota kappa nemesis lambda;}
-
-## Show exitcode on failure
-trap 'echo zsh: Program terminated with exit status $?' ZERR
-
+## include the actual config
+source $ZDIR/modules
+source $ZDIR/variables
source $ZDIR/colors
source $ZDIR/functions
source $ZDIR/options
@@ -50,8 +21,15 @@ source $ZDIR/alias/global
source $ZDIR/alias/short
source $ZDIR/completion
-unalias 'linux:'
-unalias 'openbsd:'
-
+## misc
+bindkey -e # EMACS bindings
+linux: eval $(dircolors -b $HOME/packages/zsh/etc/dircolors)
+trap 'echo zsh: Program terminated with exit status $?' ZERR
mesg n
umask 077
+
+## cleanup
+unalias 'linux:'
+unalias 'openbsd:'
+unset ZDIR
+unset uname