From: Don Armstrong Date: Sun, 21 Sep 2014 22:20:08 +0000 (-0700) Subject: Merge remote-tracking branch 'madduck/master' X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=929a2738768030f0e46f3c13a26d9cde7cd38c62;hp=d6a2e5acc380c42f9e74615a46513afaab15cf7e;p=zsh.git Merge remote-tracking branch 'madduck/master' Conflicts: .zsh/zshrc/30_aliases .zsh/zshrc/79_bindkeys --- diff --git a/.zsh/dircolors b/.zsh/dircolors index 476c4e6..c2cd451 100644 --- a/.zsh/dircolors +++ b/.zsh/dircolors @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # dircolors # # colours for directory listings for normal people @@ -11,8 +12,7 @@ ### 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 @@ -38,6 +38,7 @@ TERM dtterm TERM eterm-color TERM gnome TERM gnome-256color +TERM jfbterm TERM konsole TERM kterm TERM linux @@ -46,14 +47,21 @@ TERM mach-color 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 @@ -69,11 +77,13 @@ TERM xterm-debian # 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 @@ -82,6 +92,7 @@ CHR 40;33;01 # character device driver 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 @@ -103,23 +114,30 @@ EXEC 01;32 # 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 @@ -141,6 +159,7 @@ EXEC 01;32 .tiff 01;35 .png 01;35 .svg 01;35 +.svgz 01;35 .mng 01;35 .pcx 01;35 .mov 01;35 @@ -148,6 +167,7 @@ EXEC 01;32 .mpeg 01;35 .m2v 01;35 .mkv 01;35 +.webm 01;35 .ogm 01;35 .mp4 01;35 .m4v 01;35 @@ -162,11 +182,19 @@ EXEC 01;32 .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 @@ -179,98 +207,10 @@ EXEC 01;32 .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 diff --git a/.zsh/logging b/.zsh/logging index ad4c54a..21b75a1 100644 --- a/.zsh/logging +++ b/.zsh/logging @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # logging # # Logging abilities for the shell initialisation scripts diff --git a/.zsh/rcsstub b/.zsh/rcsstub index 2138ef0..10e652a 100644 --- a/.zsh/rcsstub +++ b/.zsh/rcsstub @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # rcsstub # # Stub for all .z* files; actual content comes from a directory diff --git a/.zsh/sourcedir b/.zsh/sourcedir index 40f1aa0..c7eb5cd 100644 --- a/.zsh/sourcedir +++ b/.zsh/sourcedir @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # sourcedir # # Defines helper function to source files in a directory diff --git a/.zsh/util b/.zsh/util index ce6f9fc..7021b3f 100644 --- a/.zsh/util +++ b/.zsh/util @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # util # # Miscellaneous utility functions diff --git a/.zsh/zlogin/10_shlvl b/.zsh/zlogin/10_shlvl index f290a1f..a728102 100644 --- a/.zsh/zlogin/10_shlvl +++ b/.zsh/zlogin/10_shlvl @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zlogin/10_shlvl # # reset SHLVL for login shells diff --git a/.zsh/zlogin/60_mime b/.zsh/zlogin/60_mime index 306ac27..8e4a8e3 100644 --- a/.zsh/zlogin/60_mime +++ b/.zsh/zlogin/60_mime @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zlogin/60_mime # # set up the shell's mime support diff --git a/.zsh/zlogout/90_sudo b/.zsh/zlogout/90_sudo index 666dfd4..af9ab61 100644 --- a/.zsh/zlogout/90_sudo +++ b/.zsh/zlogout/90_sudo @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zlogout/90_sudo # # Invalidates any existing sudo sessions diff --git a/.zsh/zlogout/99_cls b/.zsh/zlogout/99_cls index 8a11e82..5b5f7fe 100644 --- a/.zsh/zlogout/99_cls +++ b/.zsh/zlogout/99_cls @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zlogout/99_cls # # clear the screen diff --git a/.zsh/zprofile/00_ulimit b/.zsh/zprofile/00_ulimit index 131311c..985d006 100644 --- a/.zsh/zprofile/00_ulimit +++ b/.zsh/zprofile/00_ulimit @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zprofile/00_ulimit # # sets process limits @@ -8,7 +9,4 @@ # Source repository: git://git.madduck.net/etc/zsh.git # -# disable core files -ulimit -c 0 - # vim:ft=zsh diff --git a/.zsh/zprofile/10_locale b/.zsh/zprofile/10_locale index 818351e..1813628 100644 --- a/.zsh/zprofile/10_locale +++ b/.zsh/zprofile/10_locale @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zprofile/10_locale # # Defines locale settings @@ -35,58 +36,20 @@ if [ -x =locale ]; then # 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 @@ -94,27 +57,6 @@ if [ -x =locale ]; then ;; 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 diff --git a/.zsh/zprofile/40_zcompile b/.zsh/zprofile/40_zcompile index eb6abb5..fab7d7b 100644 --- a/.zsh/zprofile/40_zcompile +++ b/.zsh/zprofile/40_zcompile @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zlogin/40_zcompile # # compile zsh snippets diff --git a/.zsh/zshenv/00_rdirs b/.zsh/zshenv/00_rdirs index 2822fe7..035ac57 100644 --- a/.zsh/zshenv/00_rdirs +++ b/.zsh/zshenv/00_rdirs @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshenv/00_rdirs # # Assigns paths to related directories to a number of variables @@ -8,14 +9,14 @@ # 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)" diff --git a/.zsh/zshenv/01_fpath b/.zsh/zshenv/01_fpath index 8e3a5a4..20b1237 100644 --- a/.zsh/zshenv/01_fpath +++ b/.zsh/zshenv/01_fpath @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshenv/00_fpath # # Adds local functions directory to $fpath diff --git a/.zsh/zshenv/01_path b/.zsh/zshenv/01_path index e4e81fa..0a68895 100644 --- a/.zsh/zshenv/01_path +++ b/.zsh/zshenv/01_path @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zprofile/00_path # # Adds custom directories to the $PATH diff --git a/.zsh/zshenv/10_zvars b/.zsh/zshenv/10_zvars index 9bc081f..aec7daa 100644 --- a/.zsh/zshenv/10_zvars +++ b/.zsh/zshenv/10_zvars @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshenv/10_zvars # # set a number of core zsh variables diff --git a/.zsh/zshenv/30_codeinput b/.zsh/zshenv/30_codeinput new file mode 100644 index 0000000..524c60e --- /dev/null +++ b/.zsh/zshenv/30_codeinput @@ -0,0 +1,5 @@ +# -*- mode: sh -*- +# -*- mode: sh -*- +# fix the code input +export GTK_IM_MODULE=xim +export QT_IM_MODULE=xim diff --git a/.zsh/zshenv/40_editor b/.zsh/zshenv/40_editor index cdbcc2f..6636c34 100644 --- a/.zsh/zshenv/40_editor +++ b/.zsh/zshenv/40_editor @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshenv/40_editor # # set the editor variables @@ -8,7 +9,7 @@ # Source repository: git://git.madduck.net/etc/zsh.git # -export EDITOR==vim +export EDITOR=sane_editor export VISUAL=$EDITOR # vim:ft=zsh diff --git a/.zsh/zshenv/45_postgresql b/.zsh/zshenv/45_postgresql new file mode 100644 index 0000000..ef8e4e5 --- /dev/null +++ b/.zsh/zshenv/45_postgresql @@ -0,0 +1,6 @@ +# -*- mode: sh -*- +# -*- mode: sh -*- + +if [ -e ~/.hide/pg_service.conf ]; then + export PGSYSCONFDIR="$(eval 'echo' '~/.hide')"; +fi; diff --git a/.zsh/zshenv/80_debian b/.zsh/zshenv/80_debian index ebfc9ce..2be03a0 100644 --- a/.zsh/zshenv/80_debian +++ b/.zsh/zshenv/80_debian @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshenv/80_debian # # set a number of default variables related to Debian @@ -8,9 +9,9 @@ # 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="$(/dev/null` -LESS='--no-init --hilite-search --SILENT' +LESS='--no-init -R --hilite-search --SILENT' export LESS export LESSHISTFILE=~/.var/less/history diff --git a/.zsh/zshenv/80_texmf b/.zsh/zshenv/80_texmf index 96aba92..f63ba88 100644 --- a/.zsh/zshenv/80_texmf +++ b/.zsh/zshenv/80_texmf @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshenv/80_texmf # # set a number of default variables related to texmf @@ -8,7 +9,7 @@ # 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 diff --git a/.zsh/zshrc/00_autoload b/.zsh/zshrc/00_autoload index 92b7c07..28a1e64 100644 --- a/.zsh/zshrc/00_autoload +++ b/.zsh/zshrc/00_autoload @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshrc/00_autoload # # Autoload available functions diff --git a/.zsh/zshrc/00_recompile b/.zsh/zshrc/00_recompile index 24e51b6..fedc0ed 100644 --- a/.zsh/zshrc/00_recompile +++ b/.zsh/zshrc/00_recompile @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshrc/00_zrecompile # # recompile zsh snippets, if necessary diff --git a/.zsh/zshrc/00_varsetup b/.zsh/zshrc/00_varsetup index 09aa367..484a085 100644 --- a/.zsh/zshrc/00_varsetup +++ b/.zsh/zshrc/00_varsetup @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshrc/00_varsetup # # set up global variables used by the shell diff --git a/.zsh/zshrc/19_dircolors b/.zsh/zshrc/19_dircolors index 057ffa6..024d3fa 100644 --- a/.zsh/zshrc/19_dircolors +++ b/.zsh/zshrc/19_dircolors @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshrc/19_dircolors # # Load dircolors database diff --git a/.zsh/zshrc/20_compsys b/.zsh/zshrc/20_compsys index 902966a..1826511 100644 --- a/.zsh/zshrc/20_compsys +++ b/.zsh/zshrc/20_compsys @@ -1,3 +1,5 @@ +# -*- mode: sh -*- +# -*- mode: sh -*- # zshrc/20_compsys # # Configures the completions system @@ -92,6 +94,7 @@ zstyle ':completion:*:processes' command 'ps -au$USER -o pid,time,cmd|grep -v "p compdef _precommand gdb compdef _precommand nohup compdef _precommand strace +compdef _precommand faf zstyle ':completion:*' verbose yes zstyle ':completion:*:descriptions' format '%B%d%b' diff --git a/.zsh/zshrc/20_dirhashes b/.zsh/zshrc/20_dirhashes index ea1da70..c07eff5 100644 --- a/.zsh/zshrc/20_dirhashes +++ b/.zsh/zshrc/20_dirhashes @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshrc/20_dirhashes # # populate some hashes for commonly used directories diff --git a/.zsh/zshrc/30_aliases b/.zsh/zshrc/30_aliases index 7d48c0a..522fd4a 100644 --- a/.zsh/zshrc/30_aliases +++ b/.zsh/zshrc/30_aliases @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshrc/30_aliases # # Defines command shortcuts @@ -46,7 +47,7 @@ alias lart='ls -lart' 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 @@ -176,7 +177,7 @@ unset _LANGUAGES 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; 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 diff --git a/.zsh/zshrc/30_aliases_bugfix b/.zsh/zshrc/30_aliases_bugfix index c106d41..7ff5c24 100644 --- a/.zsh/zshrc/30_aliases_bugfix +++ b/.zsh/zshrc/30_aliases_bugfix @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # fix until #480889 is fixed # remove the compiled file before it gets sourced diff --git a/.zsh/zshrc/39_tempfuncs b/.zsh/zshrc/39_tempfuncs index d3391f6..173dffb 100644 --- a/.zsh/zshrc/39_tempfuncs +++ b/.zsh/zshrc/39_tempfuncs @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshrc/40_tempfuncs # # Helper functions to create temporary files and directories diff --git a/.zsh/zshrc/60_vcsprompt b/.zsh/zshrc/60_vcsprompt index b7cc3b9..f7f80ca 100644 --- a/.zsh/zshrc/60_vcsprompt +++ b/.zsh/zshrc/60_vcsprompt @@ -1,3 +1,5 @@ +# -*- mode: sh -*- +# -*- mode: sh -*- # zshrc/60_vcsprompt # # Make git information available to the prompt diff --git a/.zsh/zshrc/64_ssh b/.zsh/zshrc/64_ssh new file mode 100644 index 0000000..449d11b --- /dev/null +++ b/.zsh/zshrc/64_ssh @@ -0,0 +1,19 @@ +# -*- 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; + diff --git a/.zsh/zshrc/75_vcsinfo b/.zsh/zshrc/75_vcsinfo index 5592fc1..1aba444 100644 --- a/.zsh/zshrc/75_vcsinfo +++ b/.zsh/zshrc/75_vcsinfo @@ -1,3 +1,5 @@ +# -*- mode: sh -*- +# -*- mode: sh -*- # zshrc/75_vcsinfo # # Set up vcs_info subsystem @@ -11,16 +13,25 @@ # 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 diff --git a/.zsh/zshrc/79_bindkeys b/.zsh/zshrc/79_bindkeys index 0284400..e3d3b3a 100644 --- a/.zsh/zshrc/79_bindkeys +++ b/.zsh/zshrc/79_bindkeys @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshrc/80_bindkeys # # Defines key bindings @@ -20,6 +21,22 @@ bindkey '\e=' copy-prev-shell-word # 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 diff --git a/.zsh/zshrc/80_abbreviations b/.zsh/zshrc/80_abbreviations index cae9274..e4c00c0 100644 --- a/.zsh/zshrc/80_abbreviations +++ b/.zsh/zshrc/80_abbreviations @@ -1,9 +1,11 @@ +# -*- 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' diff --git a/.zsh/zshrc/80_history b/.zsh/zshrc/80_history index 563ad90..d5d71d2 100644 --- a/.zsh/zshrc/80_history +++ b/.zsh/zshrc/80_history @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshrc/80_history # # Set up command line history functions diff --git a/.zsh/zshrc/80_inplacemkdir b/.zsh/zshrc/80_inplacemkdir index 91acd91..103ce1a 100644 --- a/.zsh/zshrc/80_inplacemkdir +++ b/.zsh/zshrc/80_inplacemkdir @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # from grml _inplaceMkDirs() { local PATHTOMKDIR diff --git a/.zsh/zshrc/80_zle b/.zsh/zshrc/80_zle index a737800..d86a2ce 100644 --- a/.zsh/zshrc/80_zle +++ b/.zsh/zshrc/80_zle @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshrc/80_zle # # Configure the zsh line editor diff --git a/.zsh/zshrc/85_prompt b/.zsh/zshrc/85_prompt index ccb88e1..82ae890 100644 --- a/.zsh/zshrc/85_prompt +++ b/.zsh/zshrc/85_prompt @@ -1,3 +1,5 @@ +# -*- mode: sh -*- +# -*- mode: sh -*- # zshrc/80_prompt # # Formats the shell prompt @@ -8,6 +10,8 @@ # 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 diff --git a/.zsh/zshrc/85_termfonts b/.zsh/zshrc/85_termfonts index e8a1901..7d3285b 100644 --- a/.zsh/zshrc/85_termfonts +++ b/.zsh/zshrc/85_termfonts @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshrc/80_termfonts # # provide helper methods to increase/decrease fonts from the command line diff --git a/.zsh/zshrc/85_xtermtitle b/.zsh/zshrc/85_xtermtitle index 8059ca8..da7a9a4 100644 --- a/.zsh/zshrc/85_xtermtitle +++ b/.zsh/zshrc/85_xtermtitle @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshrc/80_xtermtitle # # Fancy setting of the xterm title @@ -12,11 +13,11 @@ __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 diff --git a/.zsh/zshrc/90_cleanfiles b/.zsh/zshrc/90_cleanfiles deleted file mode 100644 index b4bd2c2..0000000 --- a/.zsh/zshrc/90_cleanfiles +++ /dev/null @@ -1,47 +0,0 @@ -# zlogout/90_cleanfiles -# -# remove files we never want to keep around -# -# Copyright © 1994–2008 martin f. krafft -# 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 diff --git a/.zsh/zshrc/95_fortune.disabled b/.zsh/zshrc/95_fortune.disabled index fe4102d..0d55df2 100644 --- a/.zsh/zshrc/95_fortune.disabled +++ b/.zsh/zshrc/95_fortune.disabled @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshrc/95_fortune # # Prints a fortune cookie to each interactive shell diff --git a/.zsh/zshrc/95_watch b/.zsh/zshrc/95_watch index b9b895f..e1a5a84 100644 --- a/.zsh/zshrc/95_watch +++ b/.zsh/zshrc/95_watch @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshrc/95_watch # # watch activity of other users diff --git a/.zsh/zshrc/99_TODO b/.zsh/zshrc/99_TODO index b0084ce..fafacd1 100644 --- a/.zsh/zshrc/99_TODO +++ b/.zsh/zshrc/99_TODO @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshrc/99_TODO # # All kinds of stuff not yet split to other files @@ -52,8 +53,6 @@ setopt no_beep # use 0xXX and 0XX output instead of 16#XX/8#XX setopt c_bases -[ "$(umask)" = 022 ] && umask 0077 - # remove '/' from WORDCHARS WORDCHARS="${WORDCHARS//\/}" diff --git a/.zsh/zshrc/99_hookfunctions b/.zsh/zshrc/99_hookfunctions index a8b6388..a355e4f 100644 --- a/.zsh/zshrc/99_hookfunctions +++ b/.zsh/zshrc/99_hookfunctions @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshrc/99_hookfunctions # # define hook functions in case the *_functions arrays are not honoured