# ~/.zshrc # -- David Faure [ -f ~dfaure/txt/setup/perso.zsh ] && . ~dfaure/txt/setup/perso.zsh #Machine-dependent stuff [ -f ~/.zshrc_local ] && . ~/.zshrc_local test -z "$d" && d=d path=($path /d/other/inst/bin /usr/X11R6/bin) # E.g. on elora, or cleo [ -d /d/films/bin ] && path=($path /d/films/bin) #test -f ~/.ssh-server && . ~/.ssh-server #test -f ~/.gpg-server && . ~/.gpg-server test -f ~/.dbus-server && . ~/.dbus-server # necessary on kubuntu: test -n "$HOSTNAME" || export HOSTNAME=`cat /etc/hostname` #test -f ~/.keychain/$HOSTNAME-sh && source ~/.keychain/$HOSTNAME-sh #test -f ~/.keychain/$HOSTNAME-sh-gpg && source ~/.keychain/$HOSTNAME-sh-gpg # Completion for zsh, if you have a slow machine comment these lines !!! #_compdir=/usr/share/zsh/functions/Core #[[ -z $fpath[(r)$_compdir] ]] && fpath=($fpath $_compdir) fpath=($fpath /d/kde/src/kdesdk/scripts/completions/zsh) fpath=($HOME/src/zshkde-completions-0.1 $fpath) autoload -U compinit # compinit enables the huge completion catalogue in $fpath, says tronical # David: added -C to avoid a warning when doing sudo -s ... removed again, the right solution is sudo -s -H. compinit alias su='sudo -s -H' alias be='sudo -s -H -u' # example: be david export PATH=/d/kde/src/t/kdesdk/scripts:$PATH export PATH=/d/kdab/src/kdab-utils/Scripts:$PATH:$HOME/bin:/sbin:/usr/sbin:/mnt/perso/bin:. export KDESRC=/d/kde/src export KDEBUILD=/d/kde/build DBUSDIR=/d/kde/inst/dbusdir export PKG_CONFIG_PATH=$DBUSDIR/lib/pkgconfig:$PKG_CONFIG_PATH export PATH=$DBUSDIR/bin:$PATH export LD_LIBRARY_PATH=$DBUSDIR/lib:$LD_LIBRARY_PATH if test -d /d/other/inst/icecream/bin; then export PATH=/d/other/inst/icecream/bin:$PATH else export PATH=/usr/lib/icecc/bin:$PATH fi export PKG_CONFIG_PATH=/d/other/inst/icecream/lib/pkgconfig:$PKG_CONFIG_PATH export JAVA_HOME=/usr/jdk-sun1.2.2 # compctl # Complétion multi-niveaux #. ~/bin/multicomp.zsh #compctl -D -f + -U -K multicomp # Improve ssh and scp completion logins=(`cat ~dfaure/txt/.logins`) zstyle ':completion:*:my-accounts' users-hosts $logins # talk write finger #function TALKABLE { reply=(`users | sed s/$USER//g` cmaion@ifhamy acassen@whadim sdesitte@horwen.resF hsimonch@ifhamy fcarli@f-carli.tel tflorent@i502.resi naversen@i324 mscrizzi@bernie.resf kader@i212.resi pyv@i405.resi); } #compctl -K TALKABLE talk write finger # cd, pushd compctl -g '*(-/)' + -g '.*(-/)' cd pushd # gzip, ... compctl -x 'R[-*[dt],^*]' -g '*.(gz|z|Z|t[agp]z|tarZ|tz)' + -g '*(-/)' + -f - \ 's[]' -g '^*(.(tz|gz|t[agp]z|tarZ|zip|ZIP|jpg|JPG|gif|GIF|[zZ])|[~#])' \ + -f -- gzip compctl -g '*.(gz|z|Z|t[agp]z|tarZ|tz)' + -g '*(-/)' gunzip gzcat zcat # zip compctl -g '*.(zip|Zip|ZIP)' + -g '*(-/)' unzip # bzip2 compctl -g '*.([bB][zZ]2)' + -g '*(-/)' bunzip2 # xdvi kdvi compctl -g '*.dvi' + -g '*(-/)' + -f xdvi kdvi # Qt designer compctl -g '*.ui' + -g '*(-/)' + -f designer # make - MARCHE PAS #compctl -s "\$(awk '/^[a-zA-Z0-9][^ ]+:/ {print \$1}' FS=: [mM]akefile)" -x\ # 'c[-1,-f]' -f -- make gmake pmake # dd compctl -k '(if of conv ibs obs bs cbs files skip file seek count)' \ -S '=' -x 's[if=], s[of=]' -f - 'C[0,conv=*,*] n[-1,,], s[conv=]' \ -k '(ascii ebcdic ibm block unblock lcase ucase swap noerror sync)' \ -q -S ',' - 'n[-1,=]' -X '' -- dd # tar compctl -f -x 'W[1,*(z*f|f*z)*] p[2]' -g '*.(tar.gz|tgz|tar.Z|taz|ksp|kwd|kpr|kil)' + -g '*(-/)' - \ 'W[1,*f*] p[2]' -g '*.tar' + -g '*(-/)' -- gnutar gtar tar # su compctl -u -x 'w[1,-]p[3,-1]' -l sh - 'w[1,-]' -u - 'p[2,-1]' -l sh -- su # gv kghostview compctl -g '*.ps' + -g '*(-/)' + -f kghostview gv # tex, latex, ... compctl -g '*.tex*' + -g '*(-/)' {,la,gla,ams{la,},{g,}sli}tex texi2dvi # rpm #compctl -s '$(rpm -qa)' \ # -x 's[--]' -s 'oldpackage percent replacefiles replacepkgs noscripts # root excludedocs includedocs test upgrade test clean # short-circuit sign recompile rebuild resign querytags # queryformat version help quiet rcfile force hash' - \ # 's[ftp:]' -P '//' -s '$(/dev/null; then #function cd() { #builtin cd $1 $2 #_f=`findup .df-setup` #test -z "$_f" && _f=`findup .kdab-setup` #if test -n "$_f" -a "$_lastf" != "$_f"; then #echo "Loading $_f" #_lastf="$_f" #source "$_f" #fi #} # function cd() { local _f1 _f2 _f1d _f2d _f _d _pwd builtin cd $* _f1=`findup .df-setup` _f2=`findup .kdab-setup` if test -n "$_f1"; then _f1d=`dirname $_f1` fi if test -n "$_f2"; then _f2d=`dirname $_f2` fi if test ${#_f1d} -ge ${#_f2d}; then _f=$_f1 _d=$_f1d else _f=$_f2 _d=$_f2d fi if test -n "$_f" -a "$_lastf" != "$_f"; then _pwd="$PWD" builtin cd "$_d" echo "Loading $_f" source "$_f" builtin cd "$_pwd" _lastf="$_f" fi } fi export KDTOOLSDIR=/d/kdab/src/kdtools #source $KDEDIRCVS/bin/kdedev #test -f ~/.kde/env/kdedirs.sh && source ~/.kde/env/kdedirs.sh # Machine-dependent stuff [ -f ~/.zshrc_local_2 ] && . ~/.zshrc_local_2 # Startup directory .df-setup cd . . /etc/profile.d/autojump.zsh