+# -*- mode: sh -*-
# dircolors
#
# colours for directory listings for normal people
### BEGIN dircolors --print-database output ##################################
# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
-# Copyright (C) 1996, 1999-2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1999-2011 Free Software Foundation, Inc.
# Copying and distribution of this file, with or without modification,
# are permitted provided the copyright notice and this notice are preserved.
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
TERM eterm-color
TERM gnome
TERM gnome-256color
+TERM jfbterm
TERM konsole
TERM kterm
TERM linux
TERM mlterm
TERM putty
TERM rxvt
+TERM rxvt-256color
TERM rxvt-cygwin
TERM rxvt-cygwin-native
TERM rxvt-unicode
+TERM rxvt-unicode-256color
+TERM rxvt-unicode256
TERM screen
TERM screen-256color
+TERM screen-256color-bce
TERM screen-bce
TERM screen-w
+TERM screen.Eterm
+TERM screen.rxvt
TERM screen.linux
+TERM terminator
TERM vt100
TERM xterm
TERM xterm-16color
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
-NORMAL 00 # global default, although everything should be something.
-FILE 00 # normal file
+#NORMAL 00 # no color code at all
+#FILE 00 # regular file: use no color at all
+RESET 0 # reset to "normal" color
DIR 01;34 # directory
LINK 01;36 # symbolic link. (If you set this to 'target' instead of a
# numerical value, the color is as for the file pointed to.)
+MULTIHARDLINK 00 # regular file with more than one link
FIFO 40;33 # pipe
SOCK 01;35 # socket
DOOR 01;35 # door
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file
SETUID 37;41 # file that is setuid (u+s)
SETGID 30;43 # file that is setgid (g+s)
+CAPABILITY 30;41 # file with capability
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
# archives or compressed (bright red)
.tar 01;31
.tgz 01;31
-.svgz 01;31
.arj 01;31
.taz 01;31
.lzh 01;31
.lzma 01;31
+.tlz 01;31
+.txz 01;31
.zip 01;31
.z 01;31
.Z 01;31
.dz 01;31
.gz 01;31
+.lz 01;31
+.xz 01;31
.bz2 01;31
.bz 01;31
+.tbz 01;31
.tbz2 01;31
.tz 01;31
.deb 01;31
.rpm 01;31
.jar 01;31
+.war 01;31
+.ear 01;31
+.sar 01;31
.rar 01;31
.ace 01;31
.zoo 01;31
.tiff 01;35
.png 01;35
.svg 01;35
+.svgz 01;35
.mng 01;35
.pcx 01;35
.mov 01;35
.mpeg 01;35
.m2v 01;35
.mkv 01;35
+.webm 01;35
.ogm 01;35
.mp4 01;35
.m4v 01;35
.flc 01;35
.avi 01;35
.fli 01;35
+.flv 01;35
.gl 01;35
.dl 01;35
.xcf 01;35
.xwd 01;35
.yuv 01;35
+.cgm 01;35
+.emf 01;35
+# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
+.axv 01;35
+.anx 01;35
+.ogv 01;35
+.ogx 01;35
# audio formats
.aac 00;36
.au 00;36
.ogg 00;36
.ra 00;36
.wav 00;36
-### END dircolors --print-database output ####################################
-
-# now override stuff for those who don't take as much LSD:
-
-# Attribute codes:
-# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
-# Text color codes:
-# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
-# Background color codes:
-# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
-DIR 01;30
-LINK target
-EXEC 00;34
-
-# archives or compressed
-.tar 00;31
-.tgz 00;31
-.svgz 00;31
-.arj 00;31
-.taz 00;31
-.lzh 00;31
-.lzma 00;31
-.zip 00;31
-.z 00;31
-.Z 00;31
-.dz 00;31
-.gz 00;31
-.bz2 00;31
-.bz 00;31
-.tbz2 00;31
-.tz 00;31
-.deb 00;31
-.rpm 00;31
-.jar 00;31
-.rar 00;31
-.ace 00;31
-.zoo 00;31
-.cpio 00;31
-.7z 00;31
-.rz 00;31
-# image formats
-.jpg 00
-.jpeg 00
-.gif 00
-.bmp 00
-.pbm 00
-.pgm 00
-.ppm 00
-.tga 00
-.xbm 00
-.xpm 00
-.tif 00
-.tiff 00
-.png 00
-.svg 00
-.mng 00
-.pcx 00
-.mov 00
-.mpg 00
-.mpeg 00
-.m2v 00
-.mkv 00
-.ogm 00
-.mp4 00
-.m4v 00
-.mp4v 00
-.vob 00
-.qt 00
-.nuv 00
-.wmv 00
-.asf 00
-.rm 00
-.rmvb 00
-.flc 00
-.avi 00
-.fli 00
-.gl 00
-.dl 00
-.xcf 00
-.xwd 00
-.yuv 00
-# audio formats
-.aac 00
-.au 00
-.flac 00
-.mid 00
-.midi 00
-.mka 00
-.mp3 00
-.mpc 00
-.ogg 00
-.ra 00
-.wav 00
+# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
+.axa 00;36
+.oga 00;36
+.spx 00;36
+.xspf 00;36
# vim:ft=dircolors
+# -*- mode: sh -*-
# logging
#
# Logging abilities for the shell initialisation scripts
+# -*- mode: sh -*-
# rcsstub
#
# Stub for all .z* files; actual content comes from a directory
+# -*- mode: sh -*-
# sourcedir
#
# Defines helper function to source files in a directory
+# -*- mode: sh -*-
# util
#
# Miscellaneous utility functions
+# -*- mode: sh -*-
# zlogin/10_shlvl
#
# reset SHLVL for login shells
+# -*- mode: sh -*-
# zlogin/60_mime
#
# set up the shell's mime support
+# -*- mode: sh -*-
# zlogout/90_sudo
#
# Invalidates any existing sudo sessions
+# -*- mode: sh -*-
# zlogout/99_cls
#
# clear the screen
+# -*- mode: sh -*-
# zprofile/00_ulimit
#
# sets process limits
# Source repository: git://git.madduck.net/etc/zsh.git
#
-# disable core files
-ulimit -c 0
-
# vim:ft=zsh
+# -*- mode: sh -*-
# zprofile/10_locale
#
# Defines locale settings
# I prefer British English and UTF-8 over US English and non-UTF-8
# And if available, I'll take New Zealand-ey (yes, I love you, GIRLFRIEND)
case "$_LOCALE" in
- *en_NZ.utf8*)
- _set_locale en_NZ.UTF-8
- export LANG=en_NZ
- ;;
- *en_GB.utf8*)
- _set_locale en_GB.UTF-8
- export LANG=en_GB
- ;;
*en_US.utf8*)
_set_locale en_US.UTF-8
export LANG=en_US
;;
- *en_NZ.iso885915*)
- _set_locale en_NZ.ISO-8859-15
- warn "no utf-8 locale available"
- export LANG=en_NZ
- ;;
- *en_GB.iso885915*)
- _set_locale en_GB.ISO-8859-15
- warn "no utf-8 locale available"
- export LANG=en_GB
- ;;
*en_US.iso885915*)
warn "no utf-8 locale available"
_set_locale en_US.ISO-8859-15
export LANG=en_US
;;
- *en_NZ.iso88591*)
- warn "no utf-8 locale available"
- _set_locale en_NZ.ISO-8859-1
- export LANG=en_NZ
- ;;
- *en_GB.iso88591*)
- warn "no utf-8 locale available"
- _set_locale en_GB.ISO-8859-1
- export LANG=en_GB
- ;;
*en_US.iso88591*)
warn "no utf-8 locale available"
_set_locale en_US.ISO-8859-1
export LANG=en_US
;;
- *en_NZ*)
- warn "no utf-8 or iso locale available"
- _set_locale en_NZ
- export LANG=en_NZ
- ;;
- *en_GB*)
- warn "no utf-8 or iso locale available"
- _set_locale en_GB
- export LANG=en_GB
- ;;
*en_US*)
warn "no utf-8 or iso locale available"
_set_locale en_US
;;
esac
- # regional stuff should be German
- case "$_LOCALE" in
- *de_DE.utf8*)
- _set_regional_locale de_DE.UTF-8
- ;;
- *de_DE.iso885915*)
- _set_regional_locale de_DE.ISO-8859-15
- ;;
- *de_DE.iso88591*)
- _set_regional_locale de_DE.ISO-8859-1
- ;;
- *de_CH.utf8*)
- _set_regional_locale de_CH.UTF-8
- ;;
- *de_CH.iso885915*)
- _set_regional_locale de_CH.ISO-8859-15
- ;;
- *de_CH.iso88591*)
- _set_regional_locale de_CH.ISO-8859-1
- ;;
- esac
unset _LOCALE
fi
+# -*- mode: sh -*-
# zlogin/40_zcompile
#
# compile zsh snippets
+# -*- mode: sh -*-
# zshenv/00_rdirs
#
# Assigns paths to related directories to a number of variables
# Source repository: git://git.madduck.net/etc/zsh.git
#
-export VARDIR_REL=.var
+export VARDIR_REL=var
export VARDIR=$HOME/$VARDIR_REL
export ZVARDIR=$VARDIR/zsh
-export BINDIR_REL=.bin
+export BINDIR_REL=bin
export BINDIR=$HOME/$BINDIR_REL
-export TMPDIR_REL=.tmp
+export TMPDIR_REL=tmp
export TMPDIR=$HOME/$TMPDIR_REL
mkdir --mode=0700 --parent "$(readlink -f $TMPDIR)"
+# -*- mode: sh -*-
# zshenv/00_fpath
#
# Adds local functions directory to $fpath
+# -*- mode: sh -*-
# zprofile/00_path
#
# Adds custom directories to the $PATH
+# -*- mode: sh -*-
# zshenv/10_zvars
#
# set a number of core zsh variables
--- /dev/null
+# -*- mode: sh -*-
+# -*- mode: sh -*-
+# fix the code input
+export GTK_IM_MODULE=xim
+export QT_IM_MODULE=xim
+# -*- mode: sh -*-
# zshenv/40_editor
#
# set the editor variables
# Source repository: git://git.madduck.net/etc/zsh.git
#
-export EDITOR==vim
+export EDITOR=sane_editor
export VISUAL=$EDITOR
# vim:ft=zsh
--- /dev/null
+# -*- mode: sh -*-
+# -*- mode: sh -*-
+
+if [ -e ~/.hide/pg_service.conf ]; then
+ export PGSYSCONFDIR="$(eval 'echo' '~/.hide')";
+fi;
+# -*- mode: sh -*-
# zshenv/80_debian
#
# set a number of default variables related to Debian
# Source repository: git://git.madduck.net/etc/zsh.git
#
-export DEBFULLNAME='martin f. krafft'
-export DEBEMAIL=madduck@debian.org
-export DEBKEYID=55c9882d999bbcc4
+export DEBFULLNAME='Don Armstrong'
+export DEBEMAIL=don@debian.org
+export DEBKEYID=2AD865BA26040F67F9CC3660A2D13001D98C0FBA
if [[ -z "$debian_chroot" && -r /etc/debian_chroot ]]; then
export debian_chroot="$(</etc/debian_chroot)"
+# -*- mode: sh -*-
# zshenv/80_pagers
#
# set a number of default variables related to pagers
#
eval `lesspipe 2>/dev/null`
-LESS='--no-init --hilite-search --SILENT'
+LESS='--no-init -R --hilite-search --SILENT'
export LESS
export LESSHISTFILE=~/.var/less/history
+# -*- mode: sh -*-
# zshenv/80_texmf
#
# set a number of default variables related to texmf
# Source repository: git://git.madduck.net/etc/zsh.git
#
-export TEXMFHOME=$HOME/.texmf
+export TEXMFHOME=$HOME/lib/texmf
export TEXMFCONFIG=$TEXMFHOME
export TEXMFVAR=$VARDIR/texmf
+# -*- mode: sh -*-
# zshrc/00_autoload
#
# Autoload available functions
+# -*- mode: sh -*-
# zshrc/00_zrecompile
#
# recompile zsh snippets, if necessary
+# -*- mode: sh -*-
# zshrc/00_varsetup
#
# set up global variables used by the shell
+# -*- mode: sh -*-
# zshrc/19_dircolors
#
# Load dircolors database
+# -*- mode: sh -*-
+# -*- mode: sh -*-
# zshrc/20_compsys
#
# Configures the completions system
compdef _precommand gdb
compdef _precommand nohup
compdef _precommand strace
+compdef _precommand faf
zstyle ':completion:*' verbose yes
zstyle ':completion:*:descriptions' format '%B%d%b'
+# -*- mode: sh -*-
# zshrc/20_dirhashes
#
# populate some hashes for commonly used directories
+# -*- mode: sh -*-
# zshrc/30_aliases
#
# Defines command shortcuts
alias lsd='ll -d *(-/DN)'
alias lscontext=ls
-cd () { __CHPWD_RUN_FIRST=lscontext && builtin cd "$@" && unset __CHPWD_RUN_FIRST }
+#cd () { __CHPWD_RUN_FIRST=lscontext && builtin cd "$@" && unset __CHPWD_RUN_FIRST }
#_cd_l() { ll }
#chpwd_functions+=_cd_l
alias dpkg-buildpackage="dpkg-buildpackage -k$DEBKEYID -rfakeroot"
-bugsub() { echo X-debbugs-autosubscribe: madduck | sendmail -f $DEBEMAIL ${1:?No bug number}-subscribe@bugs.debian.org }
+bugsub() { echo X-debbugs-autosubscribe: don | sendmail -f $DEBEMAIL ${1:?No bug number}-subscribe@bugs.debian.org }
bugunsub() { sendmail -f $DEBEMAIL ${1:?No bug number}-unsubscribe@bugs.debian.org </dev/null }
ptssub() { echo subscribe ${1:?E: no package name given.} | sendmail -f ${2:-$DEBEMAIL} pts@qa.debian.org }
ptsunsub() { echo unsubscribe ${1:?E: no package name given.} | sendmail -f ${2:-$DEBEMAIL} pts@qa.debian.org }
alias mdtest='swaks -s localhost -t'
-if whence devtodo >/dev/null; then
- _devtodo_on_chpwd() {
- local out; out="$(devtodo)"
- [[ -n $out ]] && print "todo:\n$out"
- }
- [[ -z ${(M)chpwd_functions:#_devtodo_on_chpwd} ]] && chpwd_functions+=_devtodo_on_chpwd
-fi
-
pdfextract() {
local i=$1
local o=$2
+# -*- mode: sh -*-
# fix until #480889 is fixed
# remove the compiled file before it gets sourced
+# -*- mode: sh -*-
# zshrc/40_tempfuncs
#
# Helper functions to create temporary files and directories
+# -*- mode: sh -*-
+# -*- mode: sh -*-
# zshrc/60_vcsprompt
#
# Make git information available to the prompt
--- /dev/null
+# -*- mode: sh -*-
+# -*- mode: sh -*-
+
+# set up ssh-agent
+if which ssh-agent >/dev/null && [ -d ~/.ssh ] && \
+ [ -z "$SSH_CONNECTION" ] && [ -z "$SSH_CLIENT" ]; then
+ if [ -e ~/.ssh/ssh_agent_info ] && \
+ [ -n "$(awk -F '[=;]' '/^SSH_AGENT_PID/{print $2}' ~/.ssh/ssh_agent_info)" ] && \
+ kill -0 "$(awk -F '[=;]' '/^SSH_AGENT_PID/{print $2}' ~/.ssh/ssh_agent_info)" >/dev/null 2>&1; then
+ . ~/.ssh/ssh_agent_info > /dev/null
+ elif [ -e ~/.ssh/ssh_agent_info_$(hostname) ] && \
+ kill -0 "$(awk -F '[=;]' '/^SSH_AGENT_PID/{print $2}' ~/.ssh/ssh_agent_info_$(hostname))" >/dev/null 2>&1; then
+ . ~/.ssh/ssh_agent_info_$(hostname) > /dev/null
+ else
+ ssh-agent -s > ~/.ssh/ssh_agent_info_$(hostname)
+ . ~/.ssh/ssh_agent_info_$(hostname) > /dev/null
+ fi;
+fi;
+
+# -*- mode: sh -*-
+# -*- mode: sh -*-
# zshrc/75_vcsinfo
#
# Set up vcs_info subsystem
# see zsh-betacontrib(1)
autoload -Uz vcs_info
+zstyle ':vcs_info:*' get-revision true
+zstyle ':vcs_info:*' check-for-changes true
+zstyle ':vcs_info:*' formats '%u%c|%s:%b'
+zstyle ':vcs_info:*' actionformats '%c%u|%s@%a:%b'
+zstyle ':vcs_info:*' branchformat '%b@%r'
+zstyle ':vcs_info:*' unstagedstr "%{$fg_no_bold[red]%}"
+zstyle ':vcs_info:*' stagedstr "%{$fg_no_bold[yellow]%}"
+zstyle ':vcs_info:*' enable hg git bzr svn cvs
-zstyle ':vcs_info:*' actionformats \
- '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
-zstyle ':vcs_info:*' formats \
- '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f '
-zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
+# vcs-specific formatting...
+zstyle ':vcs_info:hg*:*' hgrevformat "%r"
+#zstyle ':vcs_info:fossil:*' fsrevformat '%.5h'
+# Silly git doesn't honor branchformat
+zstyle ':vcs_info:git*:*' formats '%c%u|%s@%a:%b@%.5i[%.5r]'
+zstyle ':vcs_info:git*:*' actionformats '%c%u|%s@%a:%b@%.5i'
-#PS1=’%F{5}[%F{2}%n%F{5}] %F{3}%3~ ${vcs_info_msg_0_}’"%f%# ’
-
-zstyle ':vcs_info:*' disable cdv darcs mtn svk p4 tla
+# now use the blasted colors!
+setopt PROMPT_SUBST
+RPROMPT='%{$fg_no_bold[green]%}${vcs_info_msg_0_}%{$reset_color%}'
#this enables vcs_info
-#precmd_functions+=vcs_info
+precmd_functions+=vcs_info
+# -*- mode: sh -*-
# zshrc/80_bindkeys
#
# Defines key bindings
# allow for better ad-hoc multiline editing
bindkey '\eq' push-line-or-edit
+# fixup ctrl-arrow stuff since it's all mucked up since zsh doesn't use readline
+bindkey "\e[1~" beginning-of-line
+bindkey "\e[4~" end-of-line
+bindkey "\e[5~" history-beginning-search-backward
+bindkey "\e[6~" history-beginning-search-forward
+bindkey "\e[3~" delete-char
+bindkey "\e[2~" quoted-insert
+bindkey "\e[5C" forward-word
+bindkey "\e[5D" backward-word
+bindkey "\e[1;5C" forward-word
+bindkey "\e[1;5D" backward-word
+
+# for rxvt
+bindkey "\e[8~" end-of-line
+bindkey "\eOc" forward-word
+bindkey "\eOd" backward-word
# fix home/end keys (for mosh)
bindkey "\e[7~" beginning-of-line
bindkey "\e[8~" end-of-line
+# -*- mode: sh -*-
typeset -Ag abbreviations
abbreviations=(
'...' '../..'
'....' '../../..'
'BG' '& exit'
- 'WC' '| wc'
+# WC is the alias for working tree for the --git-export option
+# 'WC' '| wc'
'GR' '|& grep '
'HD' '| head'
'HL' ' --help |& less -r'
+# -*- mode: sh -*-
# zshrc/80_history
#
# Set up command line history functions
+# -*- mode: sh -*-
# from grml
_inplaceMkDirs() {
local PATHTOMKDIR
+# -*- mode: sh -*-
# zshrc/80_zle
#
# Configure the zsh line editor
+# -*- mode: sh -*-
+# -*- mode: sh -*-
# zshrc/80_prompt
#
# Formats the shell prompt
# Source repository: git://git.madduck.net/etc/zsh.git
#
+PS1="%{$fg[green]%}%n@%m %{$fg[green]%}%* %{$fg[yellow]%}%25<…<%~%<<%{$reset_color%}%# "
+
if [ "${PS1:-}" = '%m%# ' ]; then
local _MIDDLE="%1v%(2v.|%B%2v%b|.)%(3v.%3v.)"
if is_root; then
+# -*- mode: sh -*-
# zshrc/80_termfonts
#
# provide helper methods to increase/decrease fonts from the command line
+# -*- mode: sh -*-
# zshrc/80_xtermtitle
#
# Fancy setting of the xterm title
__set_xterm_title() {
case $TERM in
- screen)
+ screen*)
print -nR $'\033k'$1$'\033'\\
print -nR $'\033]0;'$2$'\a'
;;
- xterm|rxvt*)
+ xterm*|rxvt*)
print -nR $'\033]0;'$*$'\a'
;;
esac
+++ /dev/null
-# zlogout/90_cleanfiles
-#
-# remove files we never want to keep around
-#
-# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-# Source repository: git://git.madduck.net/etc/zsh.git
-#
-
-typeset -la rmfiles
-
-rmfiles+=~/plugin131.trace
-rmfiles+=~/minicom.log
-rmfiles+=~/.cshrc
-rmfiles+=~/java.log.*(N)
-rmfiles+=~/unison.log
-rmfiles+=~/.bzr.log
-rmfiles+=~/.fonts.cache-1
-rmfiles+=~/.gksu.lock
-rmfiles+=~/.*.sw[mnop](N)
-rmfiles+=~/.viminfo
-rmfiles+=~/.bash_history
-rmfiles+=~/core
-rmfiles+=~/nohup.out
-rmfiles+=~/typescript
-rmfiles+=~/jpilot.log
-rmfiles+=~/srtp.log
-rmfiles+=~/hs_err_pid[0-9]*.log
-
-typeset -la _rmfiles
-
-for f in ${~rmfiles}; do
- [[ -f $f ]] || continue
- _rmfiles+="$f"
-done
-
-
-if (( $#_rmfiles )); then
- _rmfiles=(${_rmfiles#$HOME/})
- info "Removing files: ${_rmfiles[@]}..."
- rm -f ${_rmfiles[@]}
-fi
-
-unset _rmfiles
-
-# vim:ft=zsh
+# -*- mode: sh -*-
# zshrc/95_fortune
#
# Prints a fortune cookie to each interactive shell
+# -*- mode: sh -*-
# zshrc/95_watch
#
# watch activity of other users
+# -*- mode: sh -*-
# zshrc/99_TODO
#
# All kinds of stuff not yet split to other files
# use 0xXX and 0XX output instead of 16#XX/8#XX
setopt c_bases
-[ "$(umask)" = 022 ] && umask 0077
-
# remove '/' from WORDCHARS
WORDCHARS="${WORDCHARS//\/}"
+# -*- mode: sh -*-
# zshrc/99_hookfunctions
#
# define hook functions in case the *_functions arrays are not honoured