# .zshrc - zsh startup for interactive shells # This file is maintained using GNU Arch at # http://mdcc.cx/arch/{archives}/2008-ad1810-dotfiles # git/muladhara/zsh # This file is part of ad1810-dotfiles. This file is free software; you can # redistribute it and/or modify it under the terms of the GNU GPL, available # on-line at http://www.gnu.org/copyleft/gpl.html . # This file is sourced only for interactive shells. It is sourced each time a # new xterm is started. It should contain commands to set up aliases, # functions, options, key bindings, etc. # Global Order: zshenv, zprofile, zshrc, zlogin # see doc/zsh/examples/StartupFiles/zshrc d=~/etc/zsh/functions if test -d $d then # where zsh looks for shell function files fpath=($d $fpath) # Autoload all shell functions from all directories in $fpath that have the # executable bit on (the executable bit is not necessary, but gives you an # easy way to stop the autoloading of a particular shell function). # # for dirname in $fpath autoload $d/*(.x:t) fi if command -v lesspipe >/dev/null then eval `lesspipe` fi # wow! an hourly gong in the prompt! # PS1='%B%n@%M:%(t.ding.%24<...<%~)%#%b ' # note: we should do something else then %5( : # we assume that paths with more than 5 segments # are paths longer than 28 chars. we have no # builtin test for the length of the path :( PS1='%B%n@%M:%(t|ding|%5(~^%4>>%~%>>...%24<<%~^%~))%#%b ' # set variable identifying the chroot you work in (used in the prompt below) if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi PS1=${debian_chroot:+($debian_chroot)}'%B%n@%M:%(t|ding|%5(~^%4>>%~%>>...%24<<%~^%~))%#%b ' ### history stuff HISTFILE=~/.zsh_history HISTSIZE=300 #SAVEHIST=$HISTSIZE SAVEHIST=99999999999999 ############# options ################################### # do not append things to history which are allready there set -o hist_ignore_all_dups # tidy stuff before appending to history set -o hist_reduce_blanks # more history options setopt append_history hist_save_no_dups inc_append_history # do not complete when ambiguous immediately, only after second tab press # (this is the default (well, on debian systems...) # set -o auto_menu # sh style wordsplitting: treat "foo bar" as poor man's array set -o shwordsplit # Jos Backus' taste: # setopt autopushd pushdsilent menucomplete autocd cdablevars \ # completeinword completealiases nobeep \ # correctall extendedglob numericglobsort recexact \ # extendedhistory histignoredups notify #### local additions and overrules ########################################## ## joostvb's preferences ## if FIXME "i am joostvb" or "i like joostvb's style"; if true then function chpwd() { [[ -t 1 ]] || return case $TERM in sun-cmd) print -Pn "\e]1%~\e\\" ;; *xterm*|rxvt|st-*|(dt|k|E)term) print -Pn "\e]2;%n@%M:%~\a" ;; esac } # init xterm titlebar chpwd # vi like commandline editing. bindkey -v # more info by default alias ls='ls -F' fi ##FIXME first system overrules: ##/etc ##/usr/local/etc ##~/etc/ if test -f ~/etc/zsh/rc.local then source ~/etc/zsh/rc.local fi ##### The following lines could have been added by compinstall ############### _compdir=/usr/share/zsh/functions [[ -z $fpath[(r)$_compdir] ]] && fpath=($fpath $_compdir) autoload -U compinit compinit # End of lines added by compinstall