--- /dev/null
+#! /usr/bin/zsh
+
+if test -x =dircolors; then
+ eval "`dircolors`"
+ export ZLS_COLORS=$LS_COLORS
+fi
+
+setopt auto_cd
+setopt nobeep
+
+typeset -ga preexec_functions
+typeset -ga precmd_functions
+typeset -ga chpwd_functions
+
+[ -w $zsh_cache ] && HISTFILE=$zsh_cache/history
+
+HISTSIZE=10000 # size of history
+LISTMAX=1000 # never ask
+NULLCMD='cat' # use cat for > null commands
+REPORTTIME=2 # report time if execution exceeds amount of seconds
+SAVEHIST=10000 # maximum of history events to be save
+LOGCHECK=60
+watch=(notme) # watch login/logout
+WORDCHARS="*?_-.[]~/&;!#$%^(){}<>"
+ # part of word in line editor
--- /dev/null
+#! /usr/bin/zsh
+
+if [ x"$HOME" = x ] ; then
+ export HOME=$(cd ~ ; pwd)
+fi
+
+if [ x"$HOSTNAME" = x ] ; then
+ export HOSTNAME=$(hostname)
+fi
+
+export EMAIL="amand.tihon@iba-group.com"
+export FULLNAME="Amand Tihon"
+
+export EDITOR=vim
+
+
--- /dev/null
+
+# Just make sure there are no duplicate in the PATH
+
+MY_PATH=(${(s.:.)PATH})
+typeset -U MY_PATH
+MY_PATH=(
+ $HOME/bin
+ $MY_PATH
+ /{usr/,}sbin
+ )
+
+export PATH=${(j.:.)MY_PATH}
+
+
+fpath=(~/.zsh/functions $fpath)
+export fpath
--- /dev/null
+#! /usr/bin/zsh
+
+hosts=($( ( \
+ ( [ -r ~/.ssh/config ] && awk '/^host +[a-z]/ { print $2 }' ~/.ssh/config) ; \
+ ( [ -r ~/.ssh/known_hosts ] && awk '{print $1}' ~/.ssh/known_hosts | tr , '\n') \
+) | sort -u))
+
+zstyle ':completion:*:hosts' hosts $hosts
+zstyle ':completion:*:hosts' list-colors '=(#b)(*)(.lln.iba)=01;30=01;31' '=[^.]#=01;31'
+
+users=(atihon ccadmin tcsadmin tcs clinical root)
+zstyle ':completion:*' users $users
+
--- /dev/null
+#! /usr/bin/zsh
+
+# ls en couleur :
+
+alias ls="ls --color=auto"
+alias l="ls"
+alias ll="ls -l"
+alias lla="ls -al"
+alias .="source"
+
+if [ -f /etc/debian_version ]
+then
+ # Aliases pour apt :
+ alias search="apt-cache search"
+ alias show="apt-cache show"
+ alias policy="apt-cache policy"
+
+ alias update="sudo apt-get update"
+ alias install="sudo apt-get install"
+ alias upgrade="sudo apt-get upgrade"
+ alias dist-upgrade="sudo apt-get dist-upgrade"
+ alias remove="sudo apt-get remove"
+fi
+
+if [ -f /etc/SuSE-release ]
+then
+ if [ -x /usr/bin/smart ]
+ then
+ # aliases for smart, if it's present
+ alias search="smart search"
+ alias show="smart info"
+ alias update="sudo smart update"
+ alias install="sudo smart install"
+ alias remove="sudo smart remove"
+ alias upgrade="sudo smart upgrade"
+ else
+ # Aliases for zypper
+ alias search="zypper search -d"
+ alias show="zypper info"
+ alias update="sudo zypper refresh"
+ alias install="sudo zypper install"
+ alias remove="sudo zypper remove"
+
+ alias upgrade="sudo zypper update"
+ fi
+fi
+
+# to avoid the cd in mc history :
+setopt histignorespace
+alias cd=' builtin cd'
+
+alias scr='screen -rd'
+
+# Konsole tab renaming. Courtesy of Sebastian Kuegler
+# http://vizzzion.org/?blogentry=737
+if [ "$KONSOLE_DCOP_SESSION" ]
+then
+ if [ `/usr/bin/whoami` != 'root' ]
+ then
+ alias ssh='~/.zsh.d/scripts/konsolewrap ssh'
+ alias lftp='~/.zsh.d/scripts/konsolewrap lftp'
+ alias sftp='~/.zsh.d/scripts/konsolewrap sftp'
+ alias su='~/.zsh.d/scripts/konsolewrap su'
+ alias telnet='~/.zsh.d/scripts/konsolewrap telnet'
+ alias rlogin='~/.zsh.d/scripts/konsolewrap rlogin'
+ alias rsh='~/.zsh.d/scripts/konsolwrap rsh'
+
+ fi
+fi
+
--- /dev/null
+#! /usr/bin/zsh
+
+git_parse() {
+
+ psvar=()
+
+ local git_dir ref base_dir sub_dir action branch
+ git_dir=$(git rev-parse --git-dir 2> /dev/null) || return
+
+ base_dir=${$(readlink -f "$git_dir/..")/$HOME/'~'}
+
+ sub_dir=$(git rev-parse --show-prefix)
+ sub_dir=${sub_dir%/}
+ ref=$(git symbolic-ref HEAD 2> /dev/null) || return
+
+ psvar[3]=""
+
+ if [ -d "$git_dir/../.dotest" ]; then
+ if [ -f "$git_dir/../.dotest/rebasing" ]; then
+ psvar[3]="-rebase"
+ elif [ -f "$git_dir/../.dotest/applying" ]; then
+ psvar[3]="-am"
+ else
+ psvar[3]="-am-rebase"
+ fi
+ branch="$ref"
+ elif [ -f "$git_dir/.dotest-merge/interactive" ]; then
+ psvar[3]="-rebase-i"
+ branch="$(cat "$git_dir/.dotest-merge/head-name")"
+ elif [ -d "$git_dir/.dotest-merge" ]; then
+ psvar[3]="-rebase-m"
+ branch="$(cat "$git_dir/.dotest-merge/head-name")"
+ elif [ -f "$git_dir/MERGE_HEAD" ]; then
+ psvar[3]="-merge"
+ branch="$ref"
+ else
+ test -f "$git_dir/BISECT_LOG" && psvar[3]="bisect"
+ branch="$(git symbolic-ref HEAD 2>/dev/null)" || \
+ branch="$(git describe --exact-match HEAD 2>/dev/null)" || \
+ branch="$(cut -c1-7 "$git_dir/HEAD")..."
+ fi
+
+ # Got here, we're in git
+ psvar[4]=${branch#refs/heads/}
+ psvar[5]=${base_dir}
+ psvar[6]=${sub_dir}
+}
+
+precmd_functions+='git_parse'
--- /dev/null
+#! /usr/binn/zsh
+
+# Change konsole tab to current path
+konsole-rename-path () {
+ if [ "$KONSOLE_DCOP_SESSION" ]
+ then
+ local DIR
+ DIR=${PWD/#${HOME}/\~}
+ dcop ${KONSOLE_DCOP_SESSION} renameSession "$DIR"
+ fi
+}
+
+# Change konsole tab to current command
+konsole-rename-cmd () {
+ if [ "$KONSOLE_DCOP_SESSION" ]
+ then
+ # We don't need to change tab to "cd xyz" or precmd redefinition
+ # Yes, this is a dirty hack
+ if [[ "$1" != \ cd\ \"* && "$1" != \ precmd* ]]
+ then
+ local TXT
+ TXT="${1[0,33]}"
+ if [[ "$1" != "$TXT" ]]
+ then
+ TXT="${1[0,30]}..."
+ else
+ TXT="$1"
+ fi
+ dcop ${KONSOLE_DCOP_SESSION} renameSession "$TXT"
+ fi
+ fi
+}
+
+precmd_functions+='konsole-rename-path'
+preexec_functions+='konsole-rename-cmd'
+
+# On changing directory, when in mc (automatically called).
+mc_chpwd () {
+ if [ -n "$MC_SID" ]
+ then
+ konsole-rename-path
+ fi
+}
+
--- /dev/null
+#! /usr/bin/zsh
+
+autoload -U colors
+colors
+setopt prompt_subst
+
+#
+# Prepare colors, ignoring length
+#
+C_NO="%{$reset_color%}"
+C_BYELLOW="%{${fg_bold[yellow]}%}"
+C_BRED="%{${fg_bold[red]}%}"
+C_BCYAN="%{${fg_bold[cyan]}%}"
+C_GREEN="%{${fg[green]}%}"
+C_MAGENTA="%{${fg_bold[magenta]}%}"
+
+
+
+#
+# Prompt parts
+#
+_username="${C_BYELLOW}%n${C_NO}"
+_machine="${C_BRED}%m${C_NO}"
+_hour="${C_BCYAN}[%D{%H:%M}]${C_NO}"
+
+_exitcode="%(?::${C_BRED}[ %? ]${C_NO}
+)$(true)"
+
+_action="%(3v,%3v%,)"
+_path='${C_GREEN}%(5v,%15<..<%5v%<<${C_NO}${C_MAGENTA}@%4v%3v${C_NO}${C_GREEN}/%15<..<%6v%<<,%25<..<%~%<<)${C_NO}'
+
+
+#
+# Now, the prompt itself
+#
+PROMPT="${_exitcode}${_hour} ${_username}@${_machine}:${_vcs}${_path}$ "
+
--- /dev/null
+#! /usr/bin/zsh
+# This small script renames the konsole tab to the commands' last argument
+
+typeset -a args
+args=$@
+lastarg="${args[(w)-1]}"
+dcop ${KONSOLE_DCOP_SESSION} renameSession "$lastarg"
+exec $cmd "$@"
+
--- /dev/null
+#! /usr/bin/zsh
+# This small script renames the konsole tab to the commands' last argument
+
+typeset -a args
+args=$@
+lastarg="${args[(w)-1]}"
+dcop ${KONSOLE_DCOP_SESSION} renameSession "$lastarg"
+exec $cmd "$@"
+
+
+