--- /dev/null
+rcsstub
\ No newline at end of file
--- /dev/null
+rcsstub
\ No newline at end of file
--- /dev/null
+rcsstub
\ No newline at end of file
--- /dev/null
+rcsstub
\ No newline at end of file
--- /dev/null
+rcsstub
\ No newline at end of file
--- /dev/null
+#
+#
+#
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+
--- /dev/null
+# logging
+#
+# Logging abilities for the shell initialisation scripts
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+__log() {
+ local level; level="$1"; shift
+ echo "${level}: $@" >&2
+}
+__do_debug() {
+ [ -n "${ZDEBUG:-}" ]
+}
+error() {
+ [[ -o xtrace ]] && set +x && local __XTRACE=1
+ __log E "$@"
+ [ "${__XTRACE:-}" ] && set -x
+}
+warn() {
+ [[ -o xtrace ]] && set +x && local __XTRACE=1
+ __log W "$@"
+ [ "${__XTRACE:-}" ] && set -x
+}
+info() {
+ [[ -o xtrace ]] && set +x && local __XTRACE=1
+ __log I "$@"
+ [ "${__XTRACE:-}" ] && set -x
+}
+debug() {
+ [[ -o xtrace ]] && set +x && local __XTRACE=1
+ __do_debug && __log D "$@"
+ [ "${__XTRACE:-}" ] && set -x
+}
+
+# vim:ft=zsh
--- /dev/null
+# .zshenv
+#
+# Actual .zshenv file
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+. $ZDOTDIR/logging
+. $ZDOTDIR/util
+
+if [[ -o rcs ]]; then
+ __do_debug && set -x
+
+ file="$(print -P %1N)"
+ . $ZDOTDIR/sourcedir
+ sourcedir $ZDOTDIR/${file#.}
+
+ __do_debug && set +x
+fi
+
+# vim:ft=zsh
--- /dev/null
+# sourcedir
+#
+# Defines helper function to source files in a directory
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+. $ZDOTDIR/logging
+
+sourcedir() {
+ if [ ! -d "$1" ]; then
+ error "no such directory: ${1#$ZDOTDIR/}"
+ return 1
+ fi
+ debug "sourcing directory ${1#$ZDOTDIR/}"
+ for f in "$1"/*(.); do
+ case "$f" in
+ *~|*.bak|*.sw?|*.zwc|*.disabled) continue;;
+ esac
+ debug " sourcing file $f"
+ . "$f"
+ done
+}
+
+# vim:ft=zsh
--- /dev/null
+# util
+#
+# Miscellaneous utility functions
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+is_root() {
+ test ${EUID:?} -eq 0
+}
+
+# vim:ft=zsh
--- /dev/null
+# zterm-title
+#
+# Fancy setting of the xterm title
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+# Based on http://www.zshwiki.org/cgi-bin/wiki.pl?ZshHardStatus
+#
+
+__set_xterm_title() {
+ case $TERM in
+ screen)
+ print -nR $'\033k'$1$'\033'\\
+ print -nR $'\033]0;'$2$'\a'
+ ;;
+ xterm|rxvt*)
+ print -nR $'\033]0;'$*$'\a'
+ ;;
+ esac
+}
+
+__get_session_flags() {
+ local flags; flags=
+ [ -n "$DISPLAY" ] && flags="${flags}x"
+ [ -n "$SSH_AUTH_SOCK" ] && flags="${flags}a"
+ [ -n "$flags" ] && echo "[${flags}]"
+}
+
+__get_standard_prompt() {
+ print -P "%m%# %25\<..\<%~ $(__get_session_flags)"
+}
+
+set_plain_xterm_title() {
+ __set_xterm_title "$(__get_standard_prompt)"
+}
+
+set_cmd_xterm_title () {
+ local -a cmd; cmd=(${(z)1}) # Re-parse the command line
+
+ # Construct a command that will output the desired job number.
+ case $cmd[1] in
+ fg) if (( $#cmd == 1 )); then
+ # No arguments, must find the current job
+ cmd=(builtin jobs -l %+)
+ else
+ # Replace the command name, ignore extra args.
+ cmd=(builtin jobs -l ${(Q)cmd[2]})
+ fi;;
+ %*) cmd=(builtin jobs -l ${(Q)cmd[1]});; # Same as "else" above
+ *) # Not resuming a job,
+ __set_xterm_title $cmd[1]:t${cmd[2]:+ }$cmd[2,-1] "| $(__get_standard_prompt)"
+ return;; # so we're all done
+ esac
+
+ local -A jt; jt=(${(kv)jobtexts}) # Copy jobtexts for subshell
+
+ # Run the command, read its output, and look up the jobtext.
+ # Could parse $rest here, but $jobtexts (via $jt) is easier.
+ $cmd >>(
+ read num rest
+ cmd=(${(z)${(e):-\$jt$num}})
+ __set_xterm_title $leader$cmd[1]:t${cmd[2]:+ }$cmd[2,-1] "| $(__get_standard_prompt)"
+ )
+}
+
+# vim:ft=zsh
--- /dev/null
+# zlogout/90_sudo
+#
+# Invalidates any existing sudo sessions
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+sudo -K 2>/dev/null || :
+
+# vim:ft=zsh
--- /dev/null
+# zprofile/00_nocores
+#
+# Turns of core file generation
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+ulimit -c 0
+
+# vim:ft=zsh
--- /dev/null
+# zshenv/00_fpath
+#
+# Adds local functions directory to $fpath
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+FPATH="$ZDOTDIR/func:$FPATH"
+
+# vim:ft=zsh
--- /dev/null
+# zshenv/00_rdirs
+#
+# Assigns paths to related directories to a number of variables
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+export VAR_RELATIVE=.var
+export VAR=$HOME/$VAR_RELATIVE
+export ZVAR=$VAR/zsh
+export BIN_RELATIVE=.bin
+export BIN=$HOME/$BIN_RELATIVE
+
+# vim:ft=zsh
--- /dev/null
+# zshrc/00_TODO
+#
+# All kinds of stuff not yet split to other files
+# TEMPORARY
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+ldir() { eval $1="$PWD" ; : ~$1 }
+
+alias Q='exec zsh'
+alias ozsh='ZDOTDIR=$HOME/.etc/zsh exec zsh'
+
+# correct all arguments
+setopt correctall
+
+# do not clobber files with >
+setopt noclobber
+
+# automatically maintain a directory stack
+setopt autopushd pushdminus pushdsilent pushdtohome
+
+# brace expansion
+setopt braceccl
+
+# commands that take commands as arguments
+compctl -c man nohup strace gdb
+
+# automatically remove duplicates from these arrays
+typeset -gU path cdpath fpath manpath
+
+# http://xanana.ucsc.edu/~wgscott/wordpress_new/wordpress/?p=12
+typeset -ga preexec_functions
+typeset -ga precmd_functions
+typeset -ga chpwd_functions
+
+. $ZDOTDIR/xterm-title
+
+precmd_functions+=set_plain_xterm_title
+preexec_functions+=set_cmd_xterm_title
+
+[ "$(umask)" = 022 ] && umask 0077
+
+eval `lesspipe 2>/dev/null`
+
+:
+
+# vim:ft=zsh
--- /dev/null
+# zshrc/00_autoload
+#
+# Autoload available functions
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+# for p ($fpath) for fn ($p/**) autoload ${fn##*/}
+autoload $^fpath/*(.xN:t)
+autoload zargs
+
+# vim:ft=zsh
--- /dev/null
+# zshrc/25_tempfiles
+#
+# Helper functions to create temporary files and directories
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+cdt () {
+ cd $(mktemp -td cdt.XXXXXXXX)
+ pwd
+}
+
+vit () {
+ local tmpfile=$(mktemp -t vit.XXXXXXXX)
+ [ "$1" = '-' ] && cat >| $tmpfile
+ sensible-editor $tmpfile </dev/tty >/dev/tty
+ echo $tmpfile
+}
+
+# vim:ft=zsh
--- /dev/null
+# zshrc/30_aliases
+#
+# Defines command shortcuts
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+alias mv='nocorrect mv' # no spelling correction on mv
+alias cp='nocorrect cp' # no spelling correction on cp
+alias mkdir='nocorrect mkdir' # no spelling correction on mkdir
+alias find='noglob find' # no globbing for find
+
+alias grep=egrep
+
+alias ls='ls --color=auto'
+alias ll='ls -l'
+alias la='ls -a'
+alias lla='ls -la'
+# List only directories and symbolic links that point to directories
+alias lsd='ls -ld *(-/DN)'
+
+# vim:ft=zsh
--- /dev/null
+# zshrc/90_bindkeys
+#
+# Defines key bindings
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+bindkey -e
+# history expansion on pressing space
+bindkey ' ' magic-space
+
+# vim:ft=zsh
--- /dev/null
+# zshrc/90_compctl
+#
+# Configures the completions system
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+# make tab completion work the way i like it
+setopt autolist automenu recexact alwaystoend
+
+# vim:ft=zsh
--- /dev/null
+# zshrc/90_history
+#
+# Set up command line history functions
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+DEFAULT_HISTFILE=$ZVAR/history
+HISTFILE=$DEFAULT_HISTFILE
+HISTSIZE=10000
+SAVEHIST=$HISTSIZE
+
+# do not treat ! specially like csh did
+setopt no_bang_hist
+
+# ignore duplicates in the history
+setopt hist_ignore_dups
+
+# save timestamp and duration with each event
+setopt extended_history
+
+# properly lock the file on write
+setopt hist_fcntl_lock
+
+# skip over non-contiguous duplicates when searching history
+setopt hist_find_no_dups
+
+# don't store commands starting with a space in the history file
+setopt hist_ignore_space
+
+# don't store history/fc -l invocations
+setopt hist_no_store
+
+# remove superfluous blanks from each command line
+setopt hist_reduce_blanks
+
+# vim:ft=zsh
--- /dev/null
+# zshrc/90_prompt
+#
+# Formats the shell prompt
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+is_root && PS1_HL=U
+PS1="%${PS1_HL:=B}%m%${(L)PS1_HL}:%25<..<%~%# "
+unset PS1_HL
+RPS1="#[%(0?..%?,)%!]%v"
+
+# vim:ft=zsh
--- /dev/null
+# zshrc/99_fortune
+#
+# Prints a fortune cookie to each interactive shell
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+fortune 2>/dev/null || :
+
+# vim:ft=zsh
--- /dev/null
+# .zshenv
+#
+# Base zshenv file which simply delegates to files in $ZDOTDIR
+#
+# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: http://git.madduck.net/v/etc/zsh.git
+#
+
+ZDOTDIR=$HOME/.zsh
+[ -f $ZDOTDIR/.zshenv ] && . $ZDOTDIR/.zshenv