+++ /dev/null
-343236d95e98e8d7e799adfad68285552e6fa21e 0.6-1
-83947c5b4871fdcdb61c27984444754953a43bf7 0.6-2
-58df95139fec9be91798bf18eae57fdb1988b06a 0.6-3
-c65a4a53c3ab982ed7a0cb9bed229bec74dc2090 0.6-4
-21b4f22a4c92dbe0536584a5f4593a844ca35c56 0.6-5
-6c7063f150187d3ebcf32be931156d82fa2a104c 0.7.0
-4cc07939fef17e8d318c1701c61626dbba795299 0.7.1
-f13a3fb5da7c5c062e8153f125f3d0e3e48f5a41 0.8.0
-################################################################################
+README for zsh-lovers
+=====================
- +---------------------+
- |README of zsh-lovers |
- +---------------------+
-
-Please report feedback, additional information and bugs
-you notice in 'man zsh-lovers' to zsh-lover (at) michael-prokop.at
-
-zsh-lovers.*: zsh-lovers project -> man zsh-lovers
-
-refcard.*: reference card for the Z shell by Peter Stephenson,
- taken from http://www.bash2zsh.com/
-
-zsh.vim: syntax file for zsh for editor Vim by Nikolai Weibull
-
-
-directory zsh_people
-====================
-
-adam_spiers
------------
-
-Description: zshrc
-Author: Adam Spiers
-Web: http://www.adamspiers.org/computing/zsh/
-
-arne_schwabes
--------------
-
-Description: zshrc
-Author: Arne Schwabes
-Web: http://plai.de/misc/zshrc
-
-bruno_bonfils
--------------
-
-Description: Zsh resources files. (per Host/OS resource file)
-Author: Bruno Bonfils
-Web: http://www.asyd.net/arch/zsh/zsh-latest.tar.gz
-
-caphuso
--------
-
-Description: zshrc
-Author: Stephen 'caphuso' Rüger
-Web: http://caphuso.dyndns.org/~caphuso/
-
-damien_elmes
-------------
-
-Description: zshrc
-Author: Adam Spiers
-Web: http://www.adamspiers.org/computing/zsh/
-
-grml
-----
-
-Description: zsh configuration provided by the grml distribution
-Author: Michael Prokop
-Web: http://www.grml.org/
-
-marijan_peh
------------
-
-Description: zshrc
-Author: Marijan Peh
-Web: http://free-po.htnet.hr/MarijanPeh/files/zshrc
-
-strcat
-------
-
-Description: zsh configuration files
-Author: Christian 'strcat' Schneider
-Web: http://www.strcat.de/dotfiles/#zsh
-
-stchaz
-------
-
-Description: mouse.zsh
-Author: Stephane Chazelas
-Web: http://stchaz.free.fr/mouse.zsh
-
-thomas_koehler
---------------
-
-Description: zshrc, klammer.zsh, uhr.zsh
-Author: Thomas Koehler
-Web: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/zsh/index.html
-
-zyrnix
-------
-
-Description: zshrc
-Author: zyrnix
-Web: http://zshwiki.org/ZyrnixZshrcConfig
-
-ZWS-1.0.tar.bz2
----------------
-
-Description: ZWS is a simple web server written in ZSH.
-Author: Adam Chodorowski
-Web: http://www.chodorowski.com/software/zws/
-
-################################################################################
-
- -- Michael 'mika' Prokop <mika (at) grml.org>
- http://www.michael-prokop.at/ http://www.grml.org/
+zsh-lovers is a collection of tips, tricks and examples for the Z shell.
+Please head over to [grml.org/zsh/](http://grml.org/zsh/) for further details.
-zsh_people/
-refcard.pdf
zsh-lovers.pdf
zsh-lovers.html
-zsh.vim
README
dh_testdir
dh_testroot
dh_clean -k
- dh_installdirs usr/share/doc/zsh-lovers/zsh_people usr/share/man/man1
+ dh_installdirs usr/share/man/man1
binary-arch: build install
# We have nothing to do
+++ /dev/null
-" Vim syntax file
-" Language: Zsh shell script
-" Maintainer: Nikolai Weibull <source@pcppopper.org>
-" URL: http://www.pcppopper.org/vim/syntax/pcp/zsh/
-" Latest Revision: 2004-12-12
-" arch-tag: 2e2c7097-99cb-4b87-a771-3a819b69995e
-
-if version < 600
- syntax clear
-elseif exists("b:current_syntax")
- finish
-endif
-
-" Set iskeyword since we need `-' (and potentially others) in keywords.
-" For version 5.x: Set it globally
-" For version 6.x: Set it locally
-if version >= 600
- command -nargs=1 SetIsk setlocal iskeyword=<args>
-else
- command -nargs=1 SetIsk set iskeyword=<args>
-endif
-SetIsk @,48-57,_,-
-delcommand SetIsk
-
-" Todo
-syn keyword zshTodo contained TODO FIXME XXX NOTE
-
-" Comments
-syn region zshComment matchgroup=zshComment start='\%(^\|\s\)#' end='$' contains=zshTodo
-
-" PreProc
-syn match zshPreProc '^\%1l#\%(!\|compdef\|autoload\).*$'
-
-" Strings
-syn match zshQuoted '\\.'
-syn region zshString matchgroup=zshStringDelimiter start=+"+ end=+"+ contains=zshQuoted,@zshDerefs,@zshSubst
-syn region zshString matchgroup=zshStringDelimiter start=+'+ end=+'+
-" XXX: This should probably be more precise, but Zsh seems a bit confused about it itself
-syn region zshPOSIXString matchgroup=zshStringDelimiter start=+\$'+ end=+'+ contains=zshQuoted
-syn match zshJobSpec '%\(\d\+\|?\=\w\+\|[%+-]\)'
-
-" Precommand Modifiers
-syn keyword zshPrecommand noglob nocorrect exec command builtin - time
-
-" Delimiters
-syn keyword zshDelimiter do done
-
-" Conditionals
-syn keyword zshConditional if then elif else fi case in esac select
-
-" Loops
-syn keyword zshRepeat for while until repeat foreach
-
-" Exceptions
-syn keyword zshException always
-
-" Keywords
-syn keyword zshKeyword function nextgroup=zshKSHFunction skipwhite
-
-" Functions
-syn match zshKSHFunction contained '\k\+'
-syn match zshFunction '^\s*\k\+\ze\s*()'
-
-" Operators
-syn match zshOperator '||\|&&\|;\|&!\='
-
-" Here Documents
-if version < 600
- " Do nothing for now TODO: do something
-else
- syn region zshHereDoc matchgroup=zshRedir start='<<\s*\z(\S*\)' end='^\z1$' contains=@zshSubst
- syn region zshHereDoc matchgroup=zshRedir start='<<-\s*\z(\S*\)' end='^\s*\z1$' contains=@zshSubst
- syn region zshHereDoc matchgroup=zshRedir start='<<\s*\(["']\)\z(\S*\)\1' end='^\z1$'
- syn region zshHereDoc matchgroup=zshRedir start='<<-\s*\(["']\)\z(\S*\)\1' end='^\s*\z1$'
-endif
-
-" Redirections
-syn match zshRedir '\d\=\(<\|<>\|<<<\|<&\s*[0-9p-]\=\)'
-syn match zshRedir '\d\=\(>\|>>\|>&\s*[0-9p-]\=\|&>\|>>&\|&>>\)[|!]\='
-syn match zshRedir '|&\='
-
-" Variable Assignments
-syn match zshVariable '\<\h\w*\ze+\=='
-" XXX: how safe is this?
-syn region zshVariable oneline matchgroup=zshVariable start='\$\@<!\<\h\w*\[' end='\]\ze+\==' contains=@zshSubst
-
-" Variable Dereferencing
-syn cluster zshDerefs contains=zshShortDeref,zshLongDeref,zshDeref
-
-if !exists("g:zsh_syntax_variables")
- let s:zsh_syntax_variables = 'all'
-else
- let s:zsh_syntax_variables = g:zsh_syntax_variables
-endif
-
-syn match zshShortDeref '\$[!#$*@?_-]\w\@!'
-syn match zshShortDeref '\$[=^~]*[#+]*\d\+\>'
-
-syn match zshLongDeref '\$\%(ARGC\|argv\|status\|pipestatus\|CPUTYPE\|EGID\|EUID\|ERRNO\|GID\|HOST\|LINENO\|LOGNAME\)'
-syn match zshLongDeref '\$\%(MACHTYPE\|OLDPWD OPTARG\|OPTIND\|OSTYPE\|PPID\|PWD\|RANDOM\|SECONDS\|SHLVL\|signals\)'
-syn match zshLongDeref '\$\%(TRY_BLOCK_ERROR\|TTY\|TTYIDLE\|UID\|USERNAME\|VENDOR\|ZSH_NAME\|ZSH_VERSION\|REPLY\|reply\|TERM\)'
-
-syn match zshDeref '\$[=^~]*[#+]*\h\w*\>'
-
-" Commands
-syn match zshCommands '\%(^\|\s\)[.:]\ze\s'
-syn keyword zshCommands alias autoload bg bindkey break bye cap cd chdir
-syn keyword zshCommands clone comparguments compcall compctl compdescribe
-syn keyword zshCommands compfiles compgroups compquote comptags comptry
-syn keyword zshCommands compvalues continue declare dirs disable disown
-syn keyword zshCommands echo echotc echoti emulate enable eval exec exit
-syn keyword zshCommands export false fc fg functions getcap getln
-syn keyword zshCommands getopts hash history jobs kill let limit
-syn keyword zshCommands log logout popd print printf pushd pushln
-syn keyword zshCommands pwd r read readonly rehash return sched set
-syn keyword zshCommands setcap setopt shift source stat suspend test times
-syn keyword zshCommands trap true ttyctl type ulimit umask unalias
-syn keyword zshCommands unfunction unhash unlimit unset unsetopt vared
-syn keyword zshCommands wait whence where which zcompile zformat zftp zle
-syn keyword zshCommands zmodload zparseopts zprof zpty zregexparse zsocket
-syn keyword zshCommands zstyle ztcp
-
-" Types
-syn keyword zshTypes float integer local typeset
-
-" Switches
-" XXX: this may be too much
-syn match zshSwitches '\s\zs--\=[a-zA-Z0-9-]\+'
-
-" Numbers
-syn match zshNumber '[-+]\=0x\x\+\>'
-syn match zshNumber '[-+]\=0\o\+\>'
-syn match zshNumber '[-+]\=\d\+#[-+]\=\w\+\>'
-syn match zshNumber '[-+]\=\d\+\.\d\+\>'
-
-" Substitution
-syn cluster zshSubst contains=zshSubst,zshOldSubst
-syn region zshSubst matchgroup=zshSubstDelim transparent start='\$(' skip='\\)' end=')' contains=TOP
-syn region zshSubst matchgroup=zshSubstDelim transparent start='\$((' skip='\\)' end='))' contains=TOP
-syn region zshSubst matchgroup=zshSubstDelim start='\${' skip='\\}' end='}' contains=@zshSubst
-syn region zshOldSubst matchgroup=zshSubstDelim start=+`+ skip=+\\`+ end=+`+ contains=TOP,zshOldSubst
-
-" Define the default highlighting.
-" For version 5.7 and earlier: only when not done already
-" For version 5.8 and later: only when an item doesn't have highlighting yet
-if version >= 508 || !exists("did_zsh_syn_inits")
- if version < 508
- let did_zsh_syn_inits = 1
- command -nargs=+ HiLink hi link <args>
- else
- command -nargs=+ HiLink hi def link <args>
- endif
-
- HiLink zshTodo Todo
- HiLink zshComment Comment
- HiLink zshPreProc PreProc
- HiLink zshQuoted SpecialChar
- HiLink zshString String
- HiLink zshStringDelimiter zshString
- HiLink zshPOSIXString zshString
- HiLink zshJobSpec Special
- HiLink zshPrecommand Special
- HiLink zshDelimiter Keyword
- HiLink zshConditional Conditional
- HiLink zshException Exception
- HiLink zshRepeat Repeat
- HiLink zshKeyword Keyword
- HiLink zshFunction Function
- HiLink zshKSHFunction zshFunction
- HiLink zshHereDoc String
- HiLink zshOperator Operator
- HiLink zshRedir Operator
- HiLink zshVariable Identifier
- HiLink zshDereferencing PreProc
- if s:zsh_syntax_variables =~ 'short\|all'
- HiLink zshShortDeref zshDereferencing
- else
- HiLink zshShortDeref None
- endif
- if s:zsh_syntax_variables =~ 'long\|all'
- HiLink zshLongDeref zshDereferencing
- else
- HiLink zshLongDeref None
- endif
- if s:zsh_syntax_variables =~ 'all'
- HiLink zshDeref zshDereferencing
- else
- HiLink zshDerefDeref None
- endif
- HiLink zshCommands Keyword
- HiLink zshTypes Type
- HiLink zshSwitches Special
- HiLink zshNumber Number
- HiLink zshSubst PreProc
- HiLink zshOldSubst zshSubst
- HiLink zshSubstDelim zshSubst
-
- delcommand HiLink
-endif
-
-let b:current_syntax = "zsh"
-
-" vim: set sts=2 sw=2:
+++ /dev/null
-#!/bin/zsh
-#
-# .zshrc
-# for zsh 3.1.6 and newer (may work OK with earlier versions)
-#
-# by Adam Spiers <adam@spiers.net>
-#
-# Best viewed in emacs folding mode (folding.el).
-# (That's what all the # {{{ and # }}} are for.)
-#
-# $Id: .zshrc,v 1.255 2004/03/15 21:24:26 adams Exp $
-#
-
-# {{{ To do list
-
-#
-# - du1
-# - Do safes?kill(all)? functions
-#
-
-# }}}
-
-# {{{ What version are we running?
-
-if ! (( $+ZSH_VERSION_TYPE )); then
- if [[ $ZSH_VERSION == 3.0.<->* ]]; then ZSH_STABLE_VERSION=yes; fi
- if [[ $ZSH_VERSION == 3.1.<->* ]]; then ZSH_DEVEL_VERSION=yes; fi
-
- ZSH_VERSION_TYPE=old
- if [[ $ZSH_VERSION == 3.1.<6->* ||
- $ZSH_VERSION == 3.<2->.<->* ||
- $ZSH_VERSION == 4.<->* ]]
- then
- ZSH_VERSION_TYPE=new
- fi
-fi
-
-# }}}
-# {{{ Profiling
-
-[[ -n "$ZSH_PROFILE_RC" ]] && which zmodload >&/dev/null && zmodload zsh/zprof
-
-# }}}
-# {{{ Loading status
-
-zshrc_load_status () {
- # \e[0K is clear to right
- echo -n "\r.zshrc load: $* ... \e[0K"
-}
-
-# }}}
-
-# {{{ Options
-
-zshrc_load_status 'setting options'
-
-setopt \
- NO_all_export \
- always_last_prompt \
- NO_always_to_end \
- append_history \
- auto_cd \
- auto_list \
- auto_menu \
- NO_auto_name_dirs \
- auto_param_keys \
- auto_param_slash \
- auto_pushd \
- auto_remove_slash \
- NO_auto_resume \
- bad_pattern \
- bang_hist \
- NO_beep \
- NO_brace_ccl \
- correct_all \
- NO_bsd_echo \
- cdable_vars \
- NO_chase_links \
- NO_clobber \
- complete_aliases \
- complete_in_word \
- NO_correct \
- correct_all \
- csh_junkie_history \
- NO_csh_junkie_loops \
- NO_csh_junkie_quotes \
- NO_csh_null_glob \
- equals \
- extended_glob \
- extended_history \
- function_argzero \
- glob \
- NO_glob_assign \
- glob_complete \
- NO_glob_dots \
- glob_subst \
- hash_cmds \
- hash_dirs \
- hash_list_all \
- hist_allow_clobber \
- hist_beep \
- hist_ignore_dups \
- hist_ignore_space \
- NO_hist_no_store \
- hist_verify \
- NO_hup \
- NO_ignore_braces \
- NO_ignore_eof \
- interactive_comments \
- NO_list_ambiguous \
- NO_list_beep \
- list_types \
- long_list_jobs \
- magic_equal_subst \
- NO_mail_warning \
- NO_mark_dirs \
- NO_menu_complete \
- multios \
- nomatch \
- notify \
- NO_null_glob \
- numeric_glob_sort \
- NO_overstrike \
- path_dirs \
- posix_builtins \
- NO_print_exit_value \
- NO_prompt_cr \
- prompt_subst \
- pushd_ignore_dups \
- NO_pushd_minus \
- pushd_silent \
- pushd_to_home \
- rc_expand_param \
- NO_rc_quotes \
- NO_rm_star_silent \
- NO_sh_file_expansion \
- sh_option_letters \
- short_loops \
- NO_sh_word_split \
- NO_single_line_zle \
- NO_sun_keyboard_hack \
- unset \
- NO_verbose \
- zle
-
-if [[ $ZSH_VERSION_TYPE == 'new' ]]; then
- setopt \
- hist_expire_dups_first \
- hist_ignore_all_dups \
- NO_hist_no_functions \
- NO_hist_save_no_dups \
- inc_append_history \
- list_packed \
- NO_rm_star_wait
-fi
-
-if [[ $ZSH_VERSION == 3.0.<6->* || $ZSH_VERSION_TYPE == 'new' ]]; then
- setopt \
- hist_reduce_blanks
-fi
-
-# }}}
-# {{{ Environment
-
-zshrc_load_status 'setting environment'
-
-# {{{ INFOPATH
-
-[[ "$ZSH_VERSION_TYPE" == 'old' ]] || typeset -T INFOPATH infopath
-typeset -U infopath # no duplicates
-export INFOPATH
-infopath=(
- ~/local/$OSTYPE/info(N)
- ~/local/info(N)
- /usr/local/info(N)
- /usr/info(N)
- $infopath
- )
-
-# }}}
-# {{{ MANPATH
-
-case "$OSTYPE" in
- linux*)
- # Don't need to do anything through the cunningness
- # of AUTOPATH in /etc/man.config!
- ;;
-
- *)
- # Don't trust system-wide MANPATH? Remember what it was, for reference.
- sysmanpath=$HOME/.sysmanpath
- [ -e $sysmanpath ] || echo "$MANPATH" > $sysmanpath
- manpath=( )
- for dir in "$path[@]"; do
- [[ "$dir" == */bin ]] || continue
- mandir="${dir//\/bin//man}"
- [[ -d "$mandir" ]] && manpath=( "$mandir" "$manpath[@]" )
- done
-
- # ... or *do* trust system-wide MANPATH
- #MANPATH=/usr/local/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/sbin:/sbin:$MANPATH
- ;;
-esac
-
-# }}}
-
-# Variables used by zsh
-
-# {{{ Choose word delimiter characters in line editor
-
-WORDCHARS=''
-
-# }}}
-# {{{ Save a large history
-
-HISTFILE=~/.zshhistory
-HISTSIZE=3000
-SAVEHIST=3000
-
-# }}}
-# {{{ Maximum size of completion listing
-
-#LISTMAX=0 # Only ask if line would scroll off screen
-LISTMAX=1000 # "Never" ask
-
-# }}}
-# {{{ Watching for other users
-
-LOGCHECK=60
-WATCHFMT="[%B%t%b] %B%n%b has %a %B%l%b from %B%M%b"
-
-# }}}
-# {{{ Auto logout
-
-TMOUT=1800
-#TRAPALRM () {
-# clear
-# echo Inactivity timeout on $TTY
-# echo
-# vlock -c
-# echo
-# echo Terminal unlocked. [ Press Enter ]
-#}
-
-# }}}
-
-# }}}
-# {{{ Prompts
-
-# Load the theme-able prompt system and use it to set a prompt.
-# Probably only suitable for a dark background terminal.
-
-local _find_promptinit
-_find_promptinit=( $^fpath/promptinit(N) )
-if (( $#_find_promptinit >= 1 )) && [[ -r $_find_promptinit[1] ]]; then
- zshrc_load_status 'prompt system'
-
- autoload -U promptinit
- promptinit
-
- PS4="trace %N:%i> "
- #RPS1="$bold_colour$bg_red $reset_colour"
-
- # Default prompt style
- adam2_colors=( white cyan cyan green )
-
- if [[ -r $zdotdir/.zsh_prompt ]]; then
- . $zdotdir/.zsh_prompt
- fi
-
- if [[ -r /proc/$PPID/cmdline ]] &&
- egrep -q 'watchlogs|kates|nexus|vga' /proc/$PPID/cmdline;
- then
- # probably OK for fancy graphic prompt
- if [[ "`prompt -h adam2`" == *8bit* ]]; then
- prompt adam2 8bit $adam2_colors
- else
- prompt adam2 $adam2_colors
- fi
- else
- if [[ "`prompt -h adam2`" == *plain* ]]; then
- prompt adam2 plain $adam2_colors
- else
- prompt adam2 $adam2_colors
- fi
- fi
-
- if [[ $TERM == tgtelnet ]]; then
- prompt off
- fi
-else
- PS1='%n@%m %B%3~%b %# '
-fi
-
-# }}}
-
-# {{{ Completions
-
-zshrc_load_status 'completion system'
-
-# {{{ Set up new advanced completion system
-
-if [[ "$ZSH_VERSION_TYPE" == 'new' ]]; then
- autoload -U compinit
- compinit -C # don't perform security check
-else
- print "\nAdvanced completion system not found; ignoring zstyle settings."
- function zstyle { }
- function compdef { }
-
- # an antiquated, barebones completion system is better than nowt
- which zmodload >&/dev/null && zmodload zsh/compctl
-fi
-
-# }}}
-# {{{ General completion technique
-
-# zstyle ':completion:*' completer \
-# _complete _prefix _approximate:-one _ignored \
-# _complete:-extended _approximate:-four
-zstyle ':completion:*' completer _complete _prefix _ignored _complete:-extended
-
-zstyle ':completion::prefix-1:*' completer _complete
-zstyle ':completion:incremental:*' completer _complete _correct
-zstyle ':completion:predict:*' completer _complete
-
-zstyle ':completion:*:approximate-one:*' max-errors 1
-zstyle ':completion:*:approximate-four:*' max-errors 4
-
-zstyle ':completion:*:complete-extended:*' \
- matcher 'r:|[.,_-]=* r:|=*'
-
-# }}}
-# {{{ Fancy menu selection when there's ambiguity
-
-#zstyle ':completion:*' menu yes select interactive
-#zstyle ':completion:*' menu yes=long select=long interactive
-#zstyle ':completion:*' menu yes=10 select=10 interactive
-
-# }}}
-# {{{ Completion caching
-
-zstyle ':completion::complete:*' use-cache 1
-zstyle ':completion::complete:*' cache-path ~/.zsh/cache/$HOST
-
-# }}}
-# {{{ Expand partial paths
-
-zstyle ':completion:*' expand 'yes'
-zstyle ':completion:*' squeeze-slashes 'yes'
-
-# }}}
-# {{{ Include non-hidden dirs in globbed file completions for certain commands
-
-#zstyle ':completion::complete:*' \
-# tag-order 'globbed-files directories' all-files
-#zstyle ':completion::complete:*:tar:directories' file-patterns '*~.*(-/)'
-
-# }}}
-# {{{ Don't complete backup files as executables
-
-zstyle ':completion:*:complete:-command-::commands' ignored-patterns '*\~'
-
-# }}}
-# {{{ Don't complete uninteresting users
-
-zstyle ':completion:*:*:*:users' ignored-patterns \
- adm apache bin daemon games gdm halt ident junkbust lp mail mailnull \
- named news nfsnobody nobody nscd ntp operator pcap postgres radvd \
- rpc rpcuser rpm shutdown squid sshd sync uucp vcsa xfs
-
-# ... unless we really want to.
-zstyle '*' single-ignored show
-
-# }}}
-# {{{ Output formatting
-
-# Separate matches into groups
-zstyle ':completion:*:matches' group 'yes'
-
-# Describe each match group.
-zstyle ':completion:*:descriptions' format "%B---- %d%b"
-
-# Messages/warnings format
-zstyle ':completion:*:messages' format '%B%U---- %d%u%b'
-zstyle ':completion:*:warnings' format '%B%U---- no match for: %d%u%b'
-
-# Describe options in full
-zstyle ':completion:*:options' description 'yes'
-zstyle ':completion:*:options' auto-description '%d'
-
-# }}}
-# {{{ Array/association subscripts
-
-# When completing inside array or association subscripts, the array
-# elements are more useful than parameters so complete them first:
-zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
-
-# }}}
-# {{{ Completion for 'kill'
-
-zstyle ':completion:*:*:kill:*' menu yes select
-zstyle ':completion:*:kill:*' force-list always
-
-# }}}
-# {{{ Simulate my old dabbrev-expand 3.0.5 patch
-
-zstyle ':completion:*:history-words' stop yes
-zstyle ':completion:*:history-words' remove-all-dups yes
-zstyle ':completion:*:history-words' list false
-zstyle ':completion:*:history-words' menu yes
-
-# }}}
-# {{{ Common usernames
-
-# users=( tom dick harry )
-
-#zstyle ':completion:*' users $users
-
-# }}}
-# {{{ Common hostnames
-
-if [[ "$ZSH_VERSION_TYPE" == 'new' ]]; then
- : ${(A)_etc_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}}
-# _ssh_known_hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*})
-else
- # Older versions don't like the above cruft
- _etc_hosts=()
-fi
-
-hosts=(
- "$_etc_hosts[@]"
-
- localhost
-
- # ftp sites
- sunsite.org.uk
-)
-
-zstyle ':completion:*' hosts $hosts
-
-# }}}
-# {{{ (user,host) pairs
-
-# All my accounts:
-#my_accounts=(
-# {joe,root}@mymachine.com
-# jbloggs@myothermachine.com
-#)
-
-zstyle ':completion:*:my-accounts' users-hosts $my_accounts
-
-# Other people's accounts:
-#other_accounts=(
-# {fred,root}@hismachine.com
-# vera@hermachine.com
-#)
-#zstyle ':completion:*:other-accounts' users-hosts $other_accounts
-
-# }}}
-# {{{ (host, port, user) triples for telnet
-
-# telnet_users_hosts_ports=(
-# user1@host1:
-# user2@host2:
-# @mail-server:{smtp,pop3}
-# @news-server:nntp
-# @proxy-server:8000
-# )
-#zstyle ':completion:*:*:telnet:*' users-hosts-ports $telnet_users_hosts_ports
-
-# }}}
-
-# }}}
-# {{{ Aliases and functions
-
-zshrc_load_status 'aliases and functions'
-
-# {{{ Motion/editing
-
-# {{{ Better word navigation
-
-# Remember, WORDCHARS is defined as a 'list of non-alphanumeric
-# characters considered part of a word by the line editor'.
-
-# Elsewhere we set it to the empty string.
-
-_my_extended_wordchars='*?_-.[]~=&;!#$%^(){}<>:@,\\'
-_my_extended_wordchars_space="${_my_extended_wordchars} "
-_my_extended_wordchars_slash="${_my_extended_wordchars}/"
-
-# is the current position \-quoted ?
-is_backslash_quoted () {
- test "${BUFFER[$CURSOR-1,CURSOR-1]}" = "\\"
-}
-
-unquote-forward-word () {
- while is_backslash_quoted
- do zle .forward-word
- done
-}
-
-unquote-backward-word () {
- while is_backslash_quoted
- do zle .backward-word
- done
-}
-
-backward-to-space () {
- local WORDCHARS="${_my_extended_wordchars_slash}"
- zle .backward-word
- unquote-backward-word
-}
-
-forward-to-space () {
- local WORDCHARS="${_my_extended_wordchars_slash}"
- zle .forward-word
- unquote-forward-word
-}
-
-backward-to-/ () {
- local WORDCHARS="${_my_extended_wordchars}"
- zle .backward-word
- unquote-backward-word
-}
-
-forward-to-/ () {
- local WORDCHARS="${_my_extended_wordchars}"
- zle .forward-word
- unquote-forward-word
-}
-
-# Create new user-defined widgets pointing to eponymous functions.
-zle -N backward-to-space
-zle -N forward-to-space
-zle -N backward-to-/
-zle -N forward-to-/
-
-# }}}
-# {{{ kill-region-or-backward-(big-)word
-
-# autoloaded
-zle -N kill-region-or-backward-word
-zle -N kill-region-or-backward-big-word
-
-# }}}
-# {{{ kill-big-word
-
-kill-big-word () {
- local WORDCHARS="${_my_extended_wordchars_slash}"
- zle .kill-word
-}
-
-zle -N kill-big-word
-
-# }}}
-
-zle -N incremental-complete-word
-
-# }}}
-# {{{ zrecompile
-
-autoload zrecompile
-
-# }}}
-# {{{ which/where
-
-# reverse unwanted aliasing of `which' by distribution startup
-# files (e.g. /etc/profile.d/which*.sh); zsh's which is perfectly
-# good as is.
-
-alias which >&/dev/null && unalias which
-
-alias wh=where
-
-# }}}
-# {{{ run-help
-
-alias run-help >&/dev/null && unalias run-help
-autoload run-help
-
-# }}}
-# {{{ zcalc
-
-autoload zcalc
-
-# }}}
-# {{{ Restarting zsh or bash; reloading .zshrc or functions
-
-bash () {
- NO_SWITCH="yes" command bash "$@"
-}
-
-restart () {
- exec $SHELL $SHELL_ARGS "$@"
-}
-
-profile () {
- ZSH_PROFILE_RC=1 $SHELL "$@"
-}
-
-reload () {
- if [[ "$#*" -eq 0 ]]; then
- . $zdotdir/.zshrc
- else
- local fn
- for fn in "$@"; do
- unfunction $fn
- autoload -U $fn
- done
- fi
-}
-compdef _functions reload
-
-# }}}
-# {{{ ls aliases
-
-if ls -F --color >&/dev/null; then
- alias ls='command ls -F --color'
-elif ls -F >&/dev/null; then
- alias ls='command ls -F'
-elif ls --color >&/dev/null; then
- alias ls='command ls --color'
-fi
-
-# jeez I'm lazy ...
-alias l='ls -lh'
-alias ll='ls -l'
-alias la='ls -lha'
-alias lsa='ls -ah'
-alias lsd='ls -d'
-alias lsh='ls -dh .*'
-alias lsr='ls -Rh'
-alias ld='ls -ldh'
-alias lt='ls -lth'
-alias lrt='ls -lrth'
-alias lart='ls -larth'
-alias lr='ls -lRh'
-alias lsL='ls -L'
-alias lL='ls -Ll'
-alias sl=ls # often screw this up
-
-# }}}
-# {{{ File management/navigation
-
-# {{{ Changing/making/removing directory
-
-alias -g ...=../..
-alias -g ....=../../..
-alias -g .....=../../../..
-alias -g ......=../../../../..
-alias cd..='cd ..'
-alias cd...='cd ../..'
-alias cd....='cd ../../..'
-alias cd.....='cd ../../../..'
-# blegh
-alias ..='cd ..'
-alias ../..='cd ../..'
-alias ../../..='cd ../../..'
-alias ../../../..='cd ../../../..'
-alias ../../../../..='cd ../../../../..'
-
-alias cd/='cd /'
-
-alias 1='cd -'
-alias 2='cd +2'
-alias 3='cd +3'
-alias 4='cd +4'
-alias 5='cd +5'
-alias 6='cd +6'
-alias 7='cd +7'
-alias 8='cd +8'
-alias 9='cd +9'
-
-# Sweet trick from zshwiki.org :-)
-cd () {
- if (( $# != 1 )); then
- builtin cd "$@"
- return
- fi
-
- if [[ -f "$1" ]]; then
- builtin cd "$1:h"
- else
- builtin cd "$1"
- fi
-}
-
-z () {
- cd ~/"$1"
-}
-
-alias md='mkdir -p'
-alias rd=rmdir
-
-alias d='dirs -v'
-
-po () {
- popd "$@"
- dirs -v
-}
-
-# }}}
-# {{{ Renaming
-
-autoload zmv
-alias mmv='noglob zmv -W'
-
-# }}}
-
-# }}}
-# {{{ Job/process control
-
-alias j='jobs -l'
-alias dn=disown
-
-# }}}
-# {{{ History
-
-alias h='history -$LINES'
-
-# }}}
-# {{{ Environment
-
-alias ts=typeset
-compdef _typeset ts
-
-# }}}
-# {{{ Terminal
-
-alias cls='clear'
-alias term='echo $TERM'
-# {{{ Changing terminal window/icon titles
-
-which cx >&/dev/null || cx () { }
-
-if [[ "$TERM" == ([Ex]term*|screen*) ]]; then
- # Could also look at /proc/$PPID/cmdline ...
- cx
-fi
-
-# }}}
-alias sc=screen
-
-# }}}
-# {{{ Other users
-
-compdef _users lh
-
-alias f=finger
-compdef _finger f
-
-# su changes window title, even if we're not a login shell
-su () {
- command su "$@"
- cx
-}
-
-# }}}
-# {{{ No spelling correction
-
-alias man='nocorrect man'
-alias mysql='nocorrect mysql'
-alias mysqlshow='nocorrect mysqlshow'
-alias mkdir='nocorrect mkdir'
-alias mv='nocorrect mv'
-alias rj='nocorrect rj'
-
-# }}}
-# {{{ X windows related
-
-# {{{ export DISPLAY=:0.0
-
-alias sd='export DISPLAY=:0.0'
-
-# }}}
-
-# }}}
-# {{{ Different CVS setups
-
-# Sensible defaults
-unset CVS_SERVER
-export CVSROOT
-export CVS_RSH=ssh
-
-# see scvs function
-
-# }}}
-# {{{ Other programs
-
-# {{{ less
-
-alias v=less
-alias vs='less -S'
-
-# }}}
-# {{{ mutt
-
-m () {
- cx mutt
- mutt "$@"
- cxx
-}
-
-compdef _mutt m
-
-# }}}
-# {{{ editors
-
-# emacs, windowed
-e () {
- if [[ -n "$OTHER_USER" ]]; then
- emacs -l $ZDOTDIR/.emacs "$@" &!
- else
- emacs "$@" &!
- fi
-}
-
-# enable ^Z
-alias pico='/usr/bin/pico -z'
-
-if which vim >&/dev/null; then
- alias vi=vim
-fi
-
-# }}}
-# {{{ remote logins
-
-ssh () {
- cx -l "${(M)argv:#*@*}" # pick out user@host word from argv
- command ssh "$@"
- cxx
-}
-
-# Best to run this from .zshrc.local
-#dsa >&DN || echo "ssh-agent setup failed; run dsa."
-
-# }}}
-# {{{ ftp
-
-if which lftp >&/dev/null; then
- alias ftp=lftp
-elif which ncftp >&/dev/null; then
- alias ftp=ncftp
-fi
-
-# }}}
-# {{{ watching log files
-
-alias tf='less +F'
-alias tfs='less -S +F'
-
-# }}}
-# {{{ arch
-
-if which larch >&/dev/null; then
- alias a=larch
- compdef _larch a
-fi
-
-# }}}
-# {{{ bzip2
-
-alias bz=bzip2
-alias buz=bunzip2
-
-# }}}
-
-# }}}
-
-# {{{ Global aliases
-
-# WARNING: global aliases are evil. Use with caution.
-
-# {{{ For screwed up keyboards missing pipe
-
-alias -g PIPE='|'
-
-# }}}
-# {{{ Paging with less / head / tail
-
-alias -g L='| less'
-alias -g LS='| less -S'
-alias -g EL='|& less'
-alias -g ELS='|& less -S'
-
-alias -g H='| head'
-alias -g HL='| head -20'
-alias -g EH='|& head'
-alias -g EHL='|& head -20'
-
-alias -g T='| tail'
-alias -g TL='| tail -20'
-alias -g ET='|& tail'
-alias -g ETL='|& tail -20'
-
-# }}}
-# {{{ Sorting / counting
-
-alias -g C='| wc -l'
-
-alias -g S='| sort'
-alias -g US='| sort -u'
-alias -g NS='| sort -n'
-alias -g RNS='| sort -nr'
-
-# }}}
-# {{{ Common filenames
-
-alias -g DN=/dev/null
-alias -g VM=/var/log/messages
-
-# }}}
-# {{{ grep, xargs
-
-alias -g G='| egrep'
-alias -g EG='|& egrep'
-alias -g X='| xargs'
-alias -g X0='| xargs -0'
-alias -g XG='| xargs egrep'
-alias -g X0G='| xargs -0 egrep'
-
-# }}}
-
-# }}}
-
-# }}}
-# {{{ Key bindings
-
-zshrc_load_status 'key bindings'
-
-bindkey -s '^X^Z' '%-^M'
-bindkey '^[e' expand-cmd-path
-#bindkey -s '^X?' '\eb=\ef\C-x*'
-bindkey '^[^I' reverse-menu-complete
-bindkey '^X^N' accept-and-infer-next-history
-bindkey '^[p' history-beginning-search-backward
-bindkey '^[n' history-beginning-search-forward
-bindkey '^[P' history-beginning-search-backward
-bindkey '^[N' history-beginning-search-forward
-bindkey '^w' kill-region-or-backward-word
-bindkey '^[^W' kill-region-or-backward-big-word
-bindkey '^I' complete-word
-bindkey '^Xi' incremental-complete-word
-# bindkey '^[b' emacs-backward-word
-# bindkey '^[f' emacs-forward-word
-bindkey '^[B' backward-to-space
-bindkey '^[F' forward-to-space
-bindkey '^[^b' backward-to-/
-bindkey '^[^f' forward-to-/
-
-bindkey '^[D' kill-big-word
-
-if zmodload zsh/deltochar >&/dev/null; then
- bindkey '^[z' zap-to-char
- bindkey '^[Z' delete-to-char
-fi
-
-# Fix weird sequence that rxvt produces
-bindkey -s '^[[Z' '\t'
-
-alias no=ls # for Dvorak
-
-# }}}
-# {{{ Miscellaneous
-
-zshrc_load_status 'miscellaneous'
-
-# {{{ Hash named directories
-
-# cdable_vars is set, so don't need 'hash -d' in front of these
-RP=/usr/src/redhat/RPMS
-I3=/usr/src/redhat/RPMS/i386
-I4=/usr/src/redhat/RPMS/i486
-I5=/usr/src/redhat/RPMS/i586
-I6=/usr/src/redhat/RPMS/i686
-NA=/usr/src/redhat/RPMS/noarch
-SR=/usr/src/redhat/SRPMS
-SP=/usr/src/redhat/SPECS
-SO=/usr/src/redhat/SOURCES
-BU=/usr/src/redhat/BUILD
-LI=/usr/src/linux
-L4=/usr/src/linux-2.4
-CV=/usr/local/cvsroot
-RC=/etc/rc.d/init.d
-VL=/var/log
-#hash -df
-
-# }}}
-# {{{ ls colours
-
-if which dircolors >&/dev/null && [[ -e "${zdotdir}/.dircolors" ]]; then
- eval "`dircolors -b $zdotdir/.dircolors`"
-fi
-
-if [[ $ZSH_VERSION > 3.1.5 ]]; then
- zmodload -i zsh/complist
-
- zstyle ':completion:*' list-colors ''
-
- zstyle ':completion:*:*:kill:*:processes' list-colors \
- '=(#b) #([0-9]#)*=0=01;31'
-
- # completion colours
- zstyle ':completion:*' list-colors "$LS_COLORS"
-fi
-
-# }}}
-# {{{ Don't always autologout
-
-if [[ "${TERM}" == ([Ex]term*|dtterm|screen*) ]]; then
- unset TMOUT
-fi
-
-# }}}
-
-# }}}
-
-# {{{ Specific to local setups
-
-zshrc_load_status 'local hooks'
-run_local_hooks .zshrc
-
-# }}}
-
-# {{{ Clear up after status display
-
-if [[ $TERM == tgtelnet ]]; then
- echo
-else
- echo -n "\r"
-fi
-
-# }}}
-# {{{ Profile report
-
-if [[ -n "$ZSH_PROFILE_RC" ]]; then
- zprof >! ~/zshrc.zprof
- exit
-fi
-
-# }}}
-
-# {{{ Search for history loosing bug
-
-which check_hist_size >&/dev/null && check_hist_size
-
-# }}}
+++ /dev/null
-#!/bin/zsh
-# I got this file from someone (don't remember who though)
-# and modified it :).
-#
-# Arne Schwabe <arne@rfc2549.org>
-#
-# But some credit still goes to (and others):
-#
-# zshrc - by trey tabner. email: trey@epicsol.org irc: icetrey@efnet
-# not all of this is mine, a few of the completions are taken from old examples :)
-
-hosts=( news mailrapid mailgate mailgate2 mailserv \
- leros atreus monkey-island \
- ilum r2d2 kamino geonosis coruscant.rfc1149.org \
- info-stud info-e info-f angkor-vat athene webserv \
- naxos simon-the-sorcerer the-little-computer-project pissarro \
- kevin feivel orang-utan-klaus \
- queaker debian.ventourizen.de fireball \
- debian.ventourizen.de queaker )
-
-umask 022
-alias dos2unix='recode ibmpc:lat1'
-alias unix2dos='recode la1:imbpc'
-alias dp=display
-if [[ -e /usr/local/maple8-8.01/bin/ ]]; then
- alias maple=/usr/local/maple8-8.01/bin/maple
- alias xmaple=/usr/local/maple8-8.01/bin/xmaple
-fi
-
-#alias kernel='finger @finger.kernel.org'
-
-alias j='jobs -l'
-alias h='history'
-
-lynx='lynx -accept_all_cookies'
-
-alias lowercase='for i in [A-Z][A-Z]*(.); do mv "$i" "${i:l}" ;done'
-alias bt='PORT=$RANDOM; btdownloadcurses.py --max_upload_rate 3 --minport $(($PORT+1400)) --maxport $(($PORT + 1410))'
-alias btu='PORT=$RANDOM; btdownloadcurses.py --max_upload_rate 100 --minport $(($PORT+1400)) --maxport $(($PORT + 1410))'
-alias bto='PORT=$RANDOM; btdownloadcurses.py --max_upload_rate 13 --minport $(($PORT+1400)) --maxport $(($PORT + 1410))'
-alias mgqueue='ssh mailgate /home/mail/exim/bin/exim -C /home/mail/exim/configure.outgoing -bpc'
-alias acroread="LANG=de_DE acroread"
-
-export HISTFILE=$HOME/.zshhistory
-export HISTSIZE=10000
-export SAVEHIST=5000
-
-export EDITOR=emacs
-export PAGER=less
-
-export LANG=de_DE.UTF-8
-export LC_MESSAGES=C
-
-setopt \
- NO_all_export \
- always_last_prompt \
- NO_always_to_end \
- append_history \
- NO_auto_cd \
- auto_list \
- auto_menu \
- NO_auto_name_dirs \
- auto_param_keys \
- auto_param_slash \
- auto_pushd \
- auto_remove_slash \
- NO_auto_resume \
- bad_pattern \
- bang_hist \
- NO_beep \
- bg_nice \
- brace_ccl \
- bsd_echo \
- correct_all \
- cdable_vars \
- NO_chase_links \
- no_clobber \
- complete_aliases \
- complete_in_word \
- correct \
- NO_correct_all \
- csh_junkie_history \
- NO_csh_junkie_loops \
- NO_csh_junkie_quotes \
- NO_csh_null_glob \
- equals \
- extended_glob \
- extended_history \
- function_argzero \
- glob \
- NO_glob_assign \
- glob_complete \
- glob_dots \
- glob_subst \
- hash_cmds \
- hash_dirs \
- hash_list_all \
- NO_hist_allow_clobber \
- NO_hist_beep \
- hist_ignore_dups \
- hist_ignore_space \
- hist_no_store \
- no_hist_verify \
- NO_hup \
- NO_ignore_braces \
- NO_ignore_eof \
- interactive_comments \
- NO_list_ambiguous \
- NO_list_beep \
- list_types \
- long_list_jobs \
- magic_equal_subst \
- NO_mail_warning \
- NO_mark_dirs \
- NO_menu_complete \
- multios \
- nomatch \
- notify \
- NO_null_glob \
- numeric_glob_sort \
- NO_overstrike \
- path_dirs \
- posix_builtins \
- print_exit_value \
- NO_prompt_cr \
- prompt_subst \
- pushd_ignore_dups \
- NO_pushd_minus \
- NO_pushd_silent \
- pushd_to_home \
- rc_expand_param \
- NO_rc_quotes \
- NO_rm_star_silent \
- NO_sh_file_expansion \
- sh_option_letters \
- no_sh_glob \
- short_loops \
- NO_sh_word_split \
- NO_single_line_zle \
- NO_sun_keyboard_hack \
- unset \
- NO_verbose \
- NO_xtrace \
- zle
-
-
-
-# From zefram Prompt and heavily modified (you did not expect anything else, did you)
-# The screen and preexec thing came from www.zshwiki.org/cgi-bin/wiki.pl?ZshHardStatus
-
- case $TERM in
- xterm*)
- function title () {print -nP '\e]0;'$*'\a'}
- ;;
- screen*)
- function title () {
- print -nPR $'\033k'$1$'\033'\\
- print -nPR $'\033]0;'$2$'\a'
- }
- ;;
- *)
- function title() {}
- ;;
-
- esac
-
-
-function prompt_arne_zefram_precmd {
- local exitstatus=$?
- psvar=(SIG)
- [[ $exitstatus -gt 128 ]] && psvar[1]=SIG$signals[$exitstatus-127]
- [[ $psvar[1] = SIG ]] && psvar[1]=$exitstatus
- jobs % >/dev/null 2>&1 && psvar[2]=
-
- title "%n@%m:%20<...<%3~%<<"
-}
-
-function prompt_arne_zefram_setup {
- PS1='[%(00t.DING%(0T. DONG.)!.%T)]%(?..%U{%v}%u)%(!..%n%(2v.%B@%b.@))%m:%20<...<%3~%<<%# '
- PS2='%(4_:... :)%3_> '
-
- prompt_opts=( cr subst percent )
- precmd () { prompt_arne_zefram_precmd }
- function preexec {
- emulate -L zsh
- local -a cmd; cmd=(${(z)1})
- title %n@%m:$cmd[1]:t "$cmd[2,-1]"
- }
-}
-
-function prompt_arne_zefram_setup3 {
- prompt_arne_zefram_setup
- function preexec() {}
-}
-
-if [[ $USER != root ]]; then
- if [[ "$SSH_AUTH_SOCK" == "" && -f ~/.ssh/.agent-$HOST ]]; then
- echo -n "Reused PID: "
- source ~/.ssh/.agent-$HOST
- fi
-
-
- ssh-add -l 2> /dev/null # | cut -d" " -f1,3,4
-
- if [[ $? == 1 || $? == 0 ]] then
- #echo ssh agent reused
- :
- else
- if [[ -f ~/.ssh/.agent-$HOST ]]; then
- rm ~/.ssh/.agent-$HOST
- fi
- ssh-agent > ~/.ssh/.agent-$HOST
- source ~/.ssh/.agent-$HOST
- fi
- unset tmp
-fi
-
-if [[ $OSTYPE = 'linux-gnu' ]]; then
- filesystems="${${(f)$(</proc/filesystems)}#* }"
- eval "$(dircolors)"
- setterm -hbcolor bright white
- setterm -ulcolor cyan
-
- alias ls='ls --color=auto'
- alias df='df -T'
-
-
- # FreeBSD seems to be more clever, so I move this to Linux
- export PATH=/sbin:/usr/sbin:/usr/local/sbin:$PATH
- if [ -d ~/bin ]; then
- PATH="$HOME/bin:${PATH}"
- fi
-
- # Sigh, I have far _too_ many GNUism in my config
-elif test `uname` = 'FreeBSD'; then
- # No PATH setting :)))
- alias ls='ls -GF'
-
-
-
- function temp () {
- echo $(($(sysctl hw.acpi.thermal.tz0.temperature \
- | cut -d " " -f 2) / 10.0 - 273.15))
- }
-elif test `uname` = 'SunOS'; then
- PATH=/usr/sbin/:/usr/bin
- if [ -e /usr/pkg ]; then
- PATH=${PATH}:/usr/pkg/bin:/usr/pkg/sbin
- MANPATH=${MANPATH}:/usr/pkg/man
- fi
- PATH=${PATH}:/opt/SUNWspro/bin
- PATH=${PATH}:/usr/local/bin
- PATH=${PATH}:/usr/ccs/bin/:usr/ccs/lib
- PATH=${PATH}:/opt/sfw/bin
-
- if [ "DISPLAY" != "" ]; then
- PATH=${PATH}:/usr/dt/bin
- PATH=${PATH}:/usr/openwin/bin
- fi
- export PATH
-fi
-
-
-if [[ $HOST == "coruscant" ]]; then
- export CVSROOT="/var/lib/cvs"
-else
- export CVSROOT=":pserver:arne@coruscant.rfc1149.org:/var/lib/cvs"
-fi
-
-
-if test $HOST = "mailrapid" || test $HOST = "mailgate" || test $HOST = "mailgate2" || test $HOST = "mailrapid2" ; then
- export PATH=/home/mail/bin:$PATH
- if test $HOST = "mailrapid" ; then
- export PATH=$PATH:/var/mailman/bin
- fi
-fi
-
-
-
-bindkey -me
-bindkey -s '^X^Z' '%-^M'
-bindkey '^[e' expand-cmd-path
-bindkey -s '^X?' '\eb=\ef\C-x*'
-bindkey '^[^I' reverse-menu-complete
-bindkey '^[p' history-beginning-search-backward
-bindkey '^[n' history-beginning-search-forward
-
-bindkey '^p' history-beginning-search-backward
-bindkey '^n' history-beginning-search-forward
-bindkey '^[[A' history-beginning-search-backward
-bindkey '^[[B' history-beginning-search-forward
-
-bindkey '^W' kill-region
-bindkey '^I' expand-or-complete-prefix
-bindkey -s '^[[Z' '\t'
-
-
-bindkey "\e[4~" end-of-line
-bindkey "^[[8~" end-of-line
-
-bindkey "^[[1~" beginning-of-line
-bindkey "^[[7~" beginning-of-line
-
-if [[ ${ZSH_VERSION%%.*} -ge 4 ]]; then
- zstyle :compinstall filename '/home/arne/.zshrc'
- zstyle '*' hosts $hosts
- prompt_arne_zefram_setup
-
- autoload -U compinit
- compinit
-
-# setopt \
-# share_history
- else
- prompt_arne_zefram_setup3
-fi
-
-## Orginal Source Code of the Clock:
-## Thomas Köhler also has a .zshrc: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/zsh/u
-# Modified to fit to my prompt
-# Does not work so good :/
-
-#trap uhrzeit ALRM
-#TMOUT=60
-
-#function uhrzeit() {
-# print -nP "\e7\e[1;G"
-# # echo the date
-# print -nP "[%(00t.DING%(0T. DONG.)!.%T)]"
-# # restore cursor position
-# print -nP "\e8"
-#}
-
-
-
-
-
-function kernel()
-{
- printf 'GET /kdist/finger_banner HTTP1.0\n\n' | nc www.kernel.org 80 | grep latest
-}
-
-function http_header()
-{
- # This is zsh but still no gnu echoism ;P
- if [[ $2 != "" ]] { port=$2 } else { port=80 }
- if [[ $3 != "" ]] { vhost="$3" } else { vhost=$1 }
-
- printf "HEAD /$4 HTTP/1.1\\nHost: $vhost\nConnection: close\n\n" \
- | nc $1 $port
-}
-
-
-function setenv() { export $1="$2" }
-function unsetenv() { unset $1 }
-
-
+++ /dev/null
-#
-# Bruno Bonfils, <asyd@debian-fr.org>
-# Written since summer 2001
-
-# My functions (don't forget to modify fpath before call compinit !!)
-fpath=($HOME/.zsh/functions $fpath)
-
-# in order to have many completion function run comptinstall !
-
-autoload -U zutil
-autoload -U compinit
-autoload -U complist
-
-# Activation
-compinit
-
-# Global Resource files
-for file in $HOME/.zsh/rc/*.rc; do
- source $file
-done
-
-local os host
-
-# Set default umask to 027, can be override by host specific resource file
-umask 027
-
-# Hostnames resources files
-host=${$(hostname)//.*/}
-[ -f ".zsh/rc.host/${host}.zsh" ] && source ".zsh/rc.host/${host}.zsh"
-
-# OS resources files
-os=$(uname)
-[ -f ".zsh/rc.os/${os}.zsh" ] && source ".zsh/rc.os/${os}.zsh"
+++ /dev/null
--misc
-
- * Add per host resource file
- * Add per OS resource file
- * One history per host
-
- -- Bruno Bonfils <asyd@debian-fr.org> Fri, 19 Dec 2003 18:58:10 +0100
-
--colors
-
- * suppress bold
- * add audio (xm, ogg) colors
- * add doc (pdf, ps) colors
-
- -- Bruno Bonfils <asyd@debian-fr.org> Mon, 23 Dec 2002 11:32:36 +0100
+++ /dev/null
-#!/bin/zsh
-
-echo "********"
-echo "* SetUID binaries :"
-
+++ /dev/null
-#! /usr/bin/python
-
-import sys, os, string, time
-import locale
-locale.setlocale(locale.LC_ALL,"")
-
-#some default definitions
-colours = {
- 'none' : "",
- 'default' : "\033[0m",
- 'bold' : "\033[1m",
- 'underline' : "\033[4m",
- 'blink' : "\033[5m",
- 'reverse' : "\033[7m",
- 'concealed' : "\033[8m",
-
- 'black' : "\033[30m",
- 'red' : "\033[31m",
- 'green' : "\033[32m",
- 'yellow' : "\033[33m",
- 'blue' : "\033[34m",
- 'magenta' : "\033[35m",
- 'cyan' : "\033[36m",
- 'white' : "\033[37m",
-
- 'on_black' : "\033[40m",
- 'on_red' : "\033[41m",
- 'on_green' : "\033[42m",
- 'on_yellow' : "\033[43m",
- 'on_blue' : "\033[44m",
- 'on_magenta' : "\033[45m",
- 'on_cyan' : "\033[46m",
- 'on_white' : "\033[47m",
-
- 'beep' : "\007"
- }
-
-
-timeformat = "%a %b %d %H:%M:%S %Y"
-delim1 = colours["bold"]+colours["red"] # before time string
-delim2 = colours["default"]+colours["yellow"]+":" # after time string
-delim3 = ": "+colours["default"] # before command
-delim4 = colours["default"] # at the end of line
-delim5 = colours["bold"]+colours["blue"] # before unrecognized line format
-
-
-for i in [ os.environ['HOME']+"/.zsh/misc/zshistrc"]:
- if os.path.isfile(i):
- execfile(i)
-
-
-if len(sys.argv) > 1:
- historyfile = sys.argv[1]
- if os.path.isdir(historyfile):
- historyfile = historyfile + "/.zsh/history"
-else:
- historyfile = os.environ['HOME']+"/.zsh/history"
-
-f = open(historyfile,"r")
-l = f.readlines()
-for i in l:
- try:
- s1 = string.split(i, ":",2)
- timestring = s1[1]
- s2 = string.split(s1[2], ";", 1)
- delaystring = s2[0]
- commandstring = s2[1][:-1]
- t = long(timestring) # seconds since the epoch
- print delim1+time.strftime(timeformat,time.localtime(t))+delim2+delaystring+delim3+commandstring+delim4
- except:
- print delim5+i[:-1]+delim4
-
+++ /dev/null
-#compdef auto-apt
-
-# Bruno Bonfils, <asyd@zshfr.org>
-
-local expl prev ret
-
-prev="$words[CURRENT-1]"
-
-# if there is a command in arguments ?
-if [[ -n $words[(r)(run|update|update-local|merge|del|check|list|search|debuilt|status)] ]] ; then
-
- # yes, add completion for command arguments and command options
- if [[ -n $words[(r)(update|update-local|merge)] && "$words[CURRENT]" = -* ]] ; then
- _wanted option expl 'option' compadd - "-a" && return 0;
- fi
-
- if [[ -n $words[(r)(check|list|search)] && "$words[CURRENT]" = -* ]] ; then
- _wanted option expl 'option' compadd - "-v" "-f" && return 0;
- fi
-
- case $prev in
- "run")
- _wanted command expl 'command' _files -g '*(/,*)' && return 0 ;;
- "del")
- _wanted package expl 'package' _deb_packages avail && return 0 ;;
- "search")
- _arguments ':pattern:' && return 0 ;;
- esac
-
-else
-
- # no, add completion for commands or options (and options arguments)
- compset -P "*,"
-
- case $prev in
- "-a")
- local distribs
- distribs=("main" "contrib" "non-free" "non-US" "none")
-
- _wanted distribution expl 'distribution' compadd -q -S, $distribs ;;
- "-p")
- local hooks
- hooks=("exec" "open" "access" "stat" "none")
- _wanted hook expl 'hook' compadd -q -S, $hooks ;;
- "-D")
- _wanted file expl 'dbfile' _files ;;
- "-F")
- _wanted file expl 'filedb' _files ;;
- *)
-
- local commands options
-
- commands=("run" "update" "update-local" "merge" "del" "check" "list" "search" "debuild" "status")
- options=("-h" "-s" "-y" "-q" "-i" "-X" "-x" "-a" "-p" "-D" "-F" "-L")
-
- if [[ "$words[CURRENT]" = -* ]] ; then
- _wanted option expl 'option' compadd - $options
- else
- _wanted command expl 'command' compadd $commands
- fi
- ;;
- esac
-
- return 0
-fi
+++ /dev/null
-#compdef mplayer
-
-#
-# MPlayer Zsh function
-# Feb 2002, Bruno Bonfils <asyd@zshfr.org>
-# thanks to #zsh@irc.openprojects.net (specially Clint)
-#
-
-_audio-codec-list ()
-{
- if ( [[ ${+_mplayer_audio_codec} -eq 0 ]] ||
- _cache_invalid MPlayer_ac ) &&
- ! _retrieve_cache MPlayer_ac; then
-
- local buffer version
-
- buffer=(${(@f)"$(mplayer -ac help)"})
- version=buffer[1]
-
- if [[ "$version" = *\0.50* ]]; then
- _mplayer_audio_codec=(${buffer[3,-1]%% *})
- else
- _mplayer_audio_codec=(${buffer[9,-1]%% *})
- fi
-
- _store_cache MPlayer_ac _mplayer_audio_codec
- fi
-
- _wanted audio-codec expl 'audio-codec' compadd $_mplayer_audio_codec
-}
-
-_audio-driver-list ()
-{
- if ( [[ ${+_mplayer_audio_driver} -eq 0 ]] ||
- _cache_invalid MPlayer_ao ) &&
- ! _retrieve_cache MPlayer_ao; then
-
- local buffer version
-
- buffer=(${(@f)"$(mplayer -ao help)"})
- version=$buffer[1]
-
- if [[ "$version" = *\0.50* ]]; then
- _mplayer_audio_driver=(${${buffer[3,-1]/[[:blank:]]/}%%[[:blank:]]*})
- else
- _mplayer_audio_driver=(${${buffer[7,-1]/[[:blank:]]/}%%[[:blank:]]*})
- fi
-
- _store_cache MPlayer_ao _mplayer_audio_driver
-
- fi
-
- _wanted audio-driver expl 'audio-driver' compadd $_mplayer_audio_driver
-}
-
-_video-codec-list ()
-{
- if ( [[ ${+_mplayer_video_codec} -eq 0 ]] ||
- _cache_invalid MPlayer_vc ) &&
- ! _retrieve_cache MPlayer_vc; then
-
- local buffer version
-
- buffer=(${(@f)"$(mplayer -vc help)"})
- version=buffer[1]
-
- if [[ "$version" = *\0.50* ]]; then
- _mplayer_video_codec=(${buffer[3,-1]%% *})
- else
- _mplayer_video_codec=(${buffer[9,-1]%% *})
- fi
-
- _store_cache MPlayer_vc _mplayer_video_codec
- fi
-
- _wanted video-codec expl 'video-codec' compadd $_mplayer_video_codec
-}
-
-_video-driver-list ()
-{
- if ( [[ ${+_mplayer_video_driver} -eq 0 ]] ||
- _cache_invalid MPlayer_vo ) &&
- ! _retrieve_cache MPlayer_vo; then
-
- local buffer version
-
- buffer=(${(@f)"$(mplayer -vo help)"})
- version=$buffer[1]
-
- if [[ "$version" = *\0.50* ]]; then
- _mplayer_video_driver=(${${buffer[3,-1]/[[:blank:]]/}%%[[:blank:]]*})
- else
- _mplayer_video_driver=(${${buffer[7,-1]/[[:blank:]]/}%%[[:blank:]]*})
- fi
-
- _store_cache MPlayer_vo _mplayer_video_driver
-
- fi
-
- _wanted video-driver expl 'video-driver' compadd $_mplayer_video_driver
-}
-
-_skins-list ()
-{
- local _default_skin
- if zstyle -a ":completion:${curcontext}:" default-skin _default_skin; then
- if ( [[ -d ~/.mplayer/Skin/$_default_skin ]] || [[ -d /usr/local/share/Skin/mplayer/$_default_skin ]] ); then
- compadd $_default_skin && return 0
- fi
- fi
-
- if ( [[ ${+_mplayer_skins} -eq 0 ]] ||
- _cache_invalid MPlayer_skins ) &&
- ! _retrieve_cache MPlayer_skins; then
-
- if [[ -d ~/.mplayer/Skin ]]; then
- _mplayer_skins=(${(o)$(ls ~/.mplayer/Skin)})
- fi
-
- if [[ -d /usr/local/share/mplayer/Skin ]]; then
- _mplayer_skins=($_mplayer_skins ${(o)$(ls /usr/local/share/mplayer/Skin)})
- fi
-
- _store_cache MPlayer_skins _mplayer_skins
-
- fi
-
- _wanted skin expl 'skin' compadd $_mplayer_skins
-}
-
-
-_arguments -C -s \
- '-abs[sound card audio buffer size(in bytes, default: measuring)]:buffer size' \
- '-ac[force usage of a specific audio codec]:audio-codec attachment:_audio-codec-list' \
- '-afm[force usage of a specific audio codec family]:audio-codec-family:(1 2 3 4 5)' \
- '-aid[select audio channel]:audio-channel' \
- '-ao[audio driver]:audio-driver attachment:_audio-driver-list' \
- '-aspect[set aspect ratio of movies]:ratio' \
- '-benchmark[use with combination with -nosound and -vo null for benchmarking]' \
- '-chapter[specify which chapter to start playing at]:chapter' \
- '-config[specifies where to search for config files]' \
- '-delay[audio delay in seconds (may be +/- float value)]:delay' \
- '-display[specify the hostname and display number of the X server]:display attachment:_x_display' \
- '-double[enable double buffering]' \
- '-dumpaudio[writes audio stream of the file to ./stream.dump]' \
- '-dvdkey[key to decrypt stream encoded with css]:key' \
- '-dvd[tell MPlayer which movies to play]:titleid' \
- '-fbmode[change videomode from /etc/fb.modes]:fbmode' \
- '-fbmodeconfig[use config file instead /etc/fb.modes]:fbmodeconfig:_files' \
- '-fb[specifies the framebuffer device to user]' \
- '-ffactor[resample alphamap of the font]:factor:(0 0.75 1 10)' \
- '-forceidx[force rebuilding of index]' \
- '-forcexv[force using xvideo (sdl)]' \
- '-fps[force frame rate (if value is wrong in the header)]:frame-rate' \
- '-framedrop[enable slow dropping (for slow machine)]' \
- '-framedrop[frame dropping]' \
- '-frames[mplayer plays number frame, and quits]:frame-number' \
- '-fs[fullscreen]' \
- '-fsmode[fullscreen mode]:fs-mode:(0 1 2 3)' \
- '-gui[start with gui mode]' \
- '-skin[skin name]:skin attachment:_skins-list' \
- '-idx[rebuilds index of the avi]' \
- '-include[specify config file to be parsed after the default]:config-file:_files' \
- '-lircconf[specifies a configfile for lirc]:lirc-config-files attachment:_files' \
- '-mc[maximun sync correction per 5 frames (in second)]:max-sync-correction' \
- '-monitoraspect[set aspect ratio of your screen]:ratio' \
- '-ni[force usage of non-interlaced avi parser]' \
- '-nobps[do not use avg byte/sec value for A-V sync (AVI)]' \
- '-nobps[use alternative A-V sync method for AVI files]' \
- '-nodouble[disable double buffering (default)]' \
- '-nodshow[disable usage of directshow video codecs]' \
- '-noframedrop[no frame dropping]' \
- '-nosound[no sound]' \
- '-osdlevel[specifies which mode the osd should start]:osd-level:(0 1 2)' \
- '-pp[apply postprocess filter]:filter attachment:_filter-list' \
- '-quiet[display less output, status messages]' \
- '-sb[seek to byte position]:byte' \
- '-srate[specifies Hz to playback audio on]:frequence' \
- '-ss[seek to given time position (format hh:mm\[:ss\])]:position' \
- '-steromode[select type of mpeg1 stereo output]:stereo-mode:(0 1 2)' \
- '-subfps[specify frame/sec rate of subtitle file only]:rate' \
- '-sub[use/display this subtitle file]:subtitle:_files' \
- '-unicode[tells mplayer to handle the subtitle file as unicode]' \
- '-utf8[tells mplayer to handle the subtitle file as utf8]' \
- '-vcd[play video cd track]:track' \
- '-vc[force usage of a specific video codec]:video-codec attachment:_video-codec-list' \
- '-v[enable verbose output]' \
- '-vfm[force usage of a specific video codec family]:video-codec-family:(1 2 3 4 5)' \
- '-vid[select video channel]:video-channel' \
- '-vm[use XF86VidMode extension for mode changing]' \
- '-vo[video driver]:video-driver attachment:_video-driver-list' \
- '-x[scale image to x width if driver supports]:width' \
- '-xy[scale image by factor if driver supports]:factor' \
- '-y[scale image to y height if driver supports]:height' \
- '-zoom[use software scaling, where available (use with -nofs)]' \
- '-z[specify compression level for png output]:compression-level:(0 1 2 3 4 5 6 7 8)' \
- "*:video file:_files -g '*.(#i)(mpg|avi|mpeg|mov|asf|vob|mjpg)'" \
- && return 0
-return 1
-
-
+++ /dev/null
-#compdef mutt
-
-local curcontext="$curcontext" state line expl suf
-typeset -A opt_args
-
-_arguments -C -s \
- '::recipient:->userhostalias' \
- '*-a[attach file using MIME]:file attachment:_files' \
- '*-b[specify a BCC recipient]:BCC recipient:->userhost' \
- '*-c[specify a CC recipient]:CC recipient:->userhost' \
- '-e+[specify a post-init configuration command]:post-init configuration:' \
- '-f+[specify mailbox to load]:mailbox: _mailboxes' \
- '-F+[specify an init file]:init file:_files' \
- '-h[display help]' \
- '-H+[specify a draft file for message]:draft file:_files' \
- '-i+[specify file to include in message]:include file:_files' \
- '-m+[specify default mailbox type]:mailbox type:(mbox MMDF MH Maildir)' \
- '-n[bypass system configuration]' \
- '-p[resume postponed message]' \
- '-R[open in read-only mode]' \
- '-s+[specify a subject]:subject:' \
- '-v[display mutt version]' \
- '-x[emulate mailx compose]' \
- '-y[start listing mailboxes]' \
- '-z[start only if new messages]' \
- '-Z[open first mailbox with new mail]' && return 0
-
-if [[ "$state" = userhostalias ]]; then
- if compset -P '*@'; then
- _description hosts expl 'remote host name'
- _hosts "$expl[@]" -q -S, && return 0
- else
- compset -S '@*' || suf='@'
-
- _description users expl 'login name'
- _users "$expl[@]" -q -S "$suf"
-
- # added by asyd (20020304)
- if [ -r ~/.muttrc ]; then
-
- # use cache
- if ( [[ ${+_list_alias} -eq 0 ]] || _cache_invalid mutt_alias ) &&
- ! _retrieve_cache mutt_alias; then
-
- _list_alias=(${(o)${${(M)${(f)"$(< ~/.muttrc)"}##alias*}/alias /}%% *})
-
- _store_cache mutt_alias _list_alias
- fi
-
- _wanted alias expl 'alias name' compadd -q -S, $_list_alias
- fi
- return 0
-
- fi
-fi
-
-return 1
+++ /dev/null
-#dns-name;menu-name;menu-description
-wibutee;Wibutee;Router 1605R
-caroline;Caroline;Switch 2912XL
-carmya;Carmya;Bridge/Fw 1605
-smtp.axs-fr.net
+++ /dev/null
-wwwkeys.us.pgp.net
-jazzland
-62.129.173.1
-carmya
-glou.net
-caroline
-wibutee
-smtp.axs-fr.net
+++ /dev/null
-COLOR tty
-
-# Extra command line options for ls go here.
-# Basically these ones are:
-# -F = show '/' for dirs, '*' for executables, etc.
-# -T 0 = don't trust tab spacing when formatting ls output.
-OPTIONS -F -T 0
-
-# Below, there should be one TERM entry for each termtype that is colorizable
-TERM linux
-TERM screen
-TERM console
-TERM xterm
-TERM rxvt
-TERM vt100
-TERM Eterm
-
-# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
-EIGHTBIT 1
-
-# Below are the color init strings for the basic file types. A color init
-# string consists of one or more of the following numeric codes:
-# 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
-NORMAL 00 # global default, although everything should be something.
-FILE 00 # normal file
-DIR 00;34 # directory
-LINK 00;35 # symbolic link
-FIFO 40;33 # pipe
-SOCK 01;35 # socket
-BLK 40;33;01 # block device driver
-CHR 40;33;01 # character device driver
-
-# This is for files with execute permission:
-EXEC 01;32
-
-# List any file extensions like '.gz' or '.tar' that you would like ls
-# to colorize below. Put the extension, a space, and the color init string.
-# (and any comments you want to add after a '#')
-
-# Archives
-.btm 00;32
-.tar 00;31
-.tgz 00;31
-.arj 00;31
-.gz 00;31
-.bz2 00;31
-
-# Packages
-.deb 04;35
-.rpm 04;35
-
-# Images
-.jpg 00;35
-.gif 00;35 # GIF SUX !!!
-.bmp 00;35
-.xbm 00;35
-.xpm 00;35
-.tif 00;35
-.png 00;35
-
-# Sons
-.mp3 00;33
-.xm 00;33
-.ogg 00;33
-
-# Doc
-.pdf 00;36
-.PDF 00;36
-.ps 00;36
+++ /dev/null
-.TH ZSHIST 1
-.SH ZSHIST
-zshist \- read .zsh_history file
-.SH SYNOPSIS
-.B zshist
-.I [filename]
-.SH DESCRIPTION
-.BR zshist
-will parse
-.I filename
-(expecting it to be .zsh_history file with EXTENDED_HISTORY
-option set on)
-and convert timestamps to
-readable format. As a bonus, it will colourise the output.
-
-If
-.I filename
-is a directory,
-.BR zshist
-will append .zsh_history to it and try to parse that file.
-
-If no filename is given, it will read ~/.zsh_history
-
-.SH SEE ALSO
-.BR zsh "(1)
-.SH AUTHOR
-Written by Radovan Garabik <garabik@melkor.dnp.fmph.uniba.sk>
+++ /dev/null
-# delimiters can be any string, you can use colour["colourname"] and + operator
-# to get interesting colour effects
-# Colours are one of:
-# none, default, bold, underline, blink, reverse, concealed,
-# black, green, yellow, blue, magenta, cyan, white,
-# on_black, on_green, on_yellow, on_blue, on_magenta, on_cyan,
-# on_white, beep
-# on_red means that the background (instead of foreground) is painted
-# with red etc...
-
-delim1 = colours["green"] # before time string
-delim2 = colours["red"]+":" # after time string
-delim3 = ": "+colours["default"] # before command
-delim4 = colours["default"] # at the end of line - you'd better leave colours["default"] at the end!
-delim5 = colours["bold"]+colours["blue"] # before unrecognized line format
-
-
-# timeformat can contain following directives:
-#
-# Directive Meaning
-# %a Locale's abbreviated weekday name.
-# %A Locale's full weekday name.
-# %b Locale's abbreviated month name.
-# %B Locale's full month name.
-# %c Locale's appropriate date and time representation.
-# %d Day of the month as a decimal number [01,31].
-# %H Hour (24-hour clock) as a decimal number [00,23].
-# %I Hour (12-hour clock) as a decimal number [01,12].
-# %j Day of the year as a decimal number [001,366].
-# %m Month as a decimal number [01,12].
-# %M Minute as a decimal number [00,59].
-# %p Locale's equivalent of either AM or PM.
-# %S Second as a decimal number [00,61].
-# %U Week number of the year (Sunday as the first day of the week)
-# as a decimal number [00,53]. All days in a new year preceding
-# the first Sunday are considered to be in week 0.
-# %w Weekday as a decimal number [0(Sunday),6].
-# %W Week number of the year (Monday as the first day of the week)
-# as a decimal number [00,53]. All days in a new year preceding
-# the first Sunday are considered to be in week 0.
-# %x Locale's appropriate date representation.
-# %X Locale's appropriate time representation.
-# %y Year without century as a decimal number [00,99].
-# %Y Year with century as a decimal number.
-# %Z Time zone name (or by no characters if no time zone exists).
-# %% %
-
-timeformat = "%d %b %H:%M:%S"
+++ /dev/null
-# Prompts color
-
-export host_color="yellow"
-export domain_color="yellow"
-export path_color="yellow"
-export date_color="white"
+++ /dev/null
-# Prompts color
-
-export host_color="green"
-export domain_color="red"
-export path_color="blue"
-export date_color="white"
-export status_color="red"
-
-mailpath=($HOME/Mail/mbox'?Nouveau(x) message(s) dans mbox'
- $HOME/Mail/tux.u-strasbg'?Nouveau(x) message(s) dans tux')
+++ /dev/null
-# Prompts color
-
-export host_color="green"
-export domain_color="green"
-export path_color="green"
-export date_color="white"
+++ /dev/null
-export LC_CTYPE=fr_FR
-export LC_TIME=fr_FR
-# Prompts color
-
-export host_color="green"
-export domain_color="yellow"
-export path_color="red"
-export date_color="white"
-export status_color="red"
-
-mailpath=($HOME/Mail/spool/mbox.in'?Nouveau(x) message(s) dans mbox';)
+++ /dev/null
-# Alias
-
-alias date-rfc822="date '+%a, %d %b %Y %X %z'"
-
-# Prompt
-
-autoload -U colors
-colors
-
-# Format
-date_format="%H:%M"
-
-date="%{$fg[$date_color]%}%D{$date_format}"
-host="%{$fg[$host_color]%}%n%{$reset_color%}~%{$fg[$domain_color]%}%m"
-cpath="%{$fg[$path_color]%}%/%b"
-end="%{$reset_color%}"
-
-PS1="$date ($host$end) $cpath
-$end%% "
-
-# Check for GNULS
-if [ -x $(which gnuls) ] ; then
- eval `dircolors $HOME/.zsh/misc/dircolors.rc`
- alias ls='gnuls --color'
- zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
-fi
+++ /dev/null
-alias ls='ls --color'
-
-# prompt, colors are defined in host resource file
-autoload -U colors
-colors
-
-# Format
-date_format="%H:%M"
-
-date="%{$fg[$date_color]%}%D{$date_format}"
-host="%{$fg[$host_color]%}%n%{$reset_color%}~%{$fg[$domain_color]%}%m"
-cpath="%B%{$fg[$path_color]%}%/%b"
-end="%{$reset_color%}"
-
-# permit parameter expansion, command substitution and arithmetic expansion
-# in prompt
-setopt prompt_subst
-
-precmd () {
- local buffer load
- load=(${$(< /proc/loadavg)})
- LOADAVG="$load[1] $load[2]"
- buffer=(${$(free)})
- MEM="$((100 * $buffer[16] / $buffer[8]))%%"
- if [[ $buffer[19] != 0 ]]; then
- MEM="$MEM $((100 * $buffer[20] / $buffer[19]))%%"
- fi
-}
-
-stats="%{$fg[$status_color]%}[\$LOADAVG - \$MEM]"
-
-PS1="$date ($host$end) $cpath
-$end%% "
-
-RPS1="$stats%{$reset_color%}"
-
-export PS1 RPS1
-
-# function use to toggle RPS1 (which is very ugly for copy/paste)
-function rmrps1 () {
- RPS1=""
-}
-
-function rps1 () {
- RPS1="$stats%{$reset_color%}"
-}
-
-# zstyle OS specific
-eval `dircolors $HOME/.zsh/misc/dircolors.rc`
-
-# Use LS_COLORS for color completion
-zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
+++ /dev/null
-asyd
-bruno
-nioubie
+++ /dev/null
-# -*- shell-script -*-x
-
-# I prefer interactive mode
-alias mv="mv -i"
-alias rm="rm -i"
-alias cp="cp -i"
-alias ll="ls -l"
-alias la="ls -a"
-alias lsd='ls -ld *(-/DN)'
-alias ssh="ssh -C"
-alias df="df -h"
-
-# zsh corret clea to flea
-[ -x `which flea` ] && alias clea="clear"
-
-# start mutt with list mailboxes
-[ -x `which mutt` ] && alias mutt="mutt -y"
-
-# aterm
-[ -x `which aterm` ] && alias aterm="aterm -bg black -fg AntiqueWhite +sb --geometry 110x48+0+10"
-
-# LDAP
-if [ -x `which ldapsearch` ]; then
- local BASE_DN="dc=hash-group,dc=net"
- local ADMIN_DN="cn=admin,ou=People,$BASE_DN"
- alias ldapadd="ldapadd -W -x -D \"$ADMIN_DN\""
- alias ldapmodify="ldapmodify -W -x -D \"$ADMIN_DN\""
-fi
-
-# do a du -hs on each dir on current path
-alias lsdir="for dir in *;do;if [ -d \$dir ];then;du -hsL \$dir 2>/dev/null;fi;done"
-
-# misc
-[ -x `which makepasswd` ] && alias makepasswd="makepasswd | tr A-Z a-z"
-
-# ssh key management
-if [ -x `which keychain` ] && [ -r ~/.ssh/id_dsa ] ; then
- # run keychain
- keychain ~/.ssh/id_dsa
- # File to load depend on keychain version ~#[{~# (suckers)
-# if [ -d ~/.keychain ]
-# then
-# . ~/.keychain/`hostname`-sh
-# else
-# . ~/.ssh-agent-`hostname`
-# fi
- [ -r ~/.ssh-agent-`hostname` ] && . ~/.ssh-agent-`hostname`
- [ -r ~/.keychain/`hostname`-sh ] && ~/.keychain/`hostname`-sh
-else
- [ -x `which startx` ] && [ -x `which ssh-agent` ] && alias startx="ssh-agent startx"
-fi
-
-# Minicom (serial console rulez)
-[ -x `which minicom` ] && alias minicom="minicom -o"
-
-# Aterm
-[ -x `which aterm` ] && alias aterm="aterm -bg black -fg AntiqueWhite +sb --geometry 110x48+112+32"
-
-# Make a certificat
-alias cert="openssl req -new -x509 -nodes -out cert.pem -keyout cert.key -days 365"
-
-# ping (since control-c don't work for break ping)
-alias ping="ping -c 3"
-
-# IPv6 Stuff
-alias netstat6="netstat -A inet6"
-
-# Indent (according to GCS - Gnu Coding Standards)
-[ -x `which indent` ] && alias indent="indent -nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2 -ndj -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -psl -nsc -nsob"
-
-# acpi (show all available informations)
-[ -x `which acpi` ] && alias acpi="acpi -V"
-
-# Etags
-[ -x `which etags` ] && alias etags="etags --members"
+++ /dev/null
-# -*- shell-script -*-
-#
-# load emacs bindkeys
-
-bindkey -e
-
-##
-# bash kill word
-autoload -U bash-backward-kill-word
-zle -N bash-backward-kill-word
-bindkey "^F" bash-backward-kill-word
-# example :
-# cd /usr/share/doc'^F' kill the word doc
-##
+++ /dev/null
-# -*- shell-script -*-
-#
-# Trace libraries load by first argument (ELF only)
-# (note: exactly same result with ldd)
-tracelib () {
- LD_TRACE_LOADED_OBJECTS=1 $1
-}
-
-# debian upgrade
-# if the first argument is void, proceed local upgrade
-# else, send command via ssh
-# assume user have sufficient permission for upgrade
-# without interaction
-#
-# Note:
-# i use sudo with the follow lines
-#
-# Cmnd_Alias DEBIAN = /usr/bin/apt-get, /usr/bin/dpkg
-# asyd ALL = PASSWD: ALL, NOPASSWD: DEBIAN
-upgrade () {
- if [ -z $1 ] ; then
- sudo apt-get update
- sudo apt-get -u upgrade
- else
- ssh $1 sudo apt-get update
- # ask before the upgrade
- local dummy
- ssh $1 sudo apt-get --no-act upgrade
- echo -n "Process the upgrade ?"
- read -q dummy
- if [[ $dummy == "y" ]] ; then
- ssh $1 sudo apt-get -u upgrade --yes
- fi
- fi
-}
-
-compdef _hosts upgrade
-
-lsperm () {
- echo $1 | perl -e 'chomp($s=<>);$p=(stat($s))[2] & 07777;printf "$s -> %04o\n",$p'
-}
-
-findnosecure () {
- find / -perm +4000 -print
-}
-
-function cd () {
-if [[ -z $2 ]]; then
- if [[ -f $1 ]]; then
- builtin cd $1:h
- else
- builtin cd $1
- fi
-else
- if [[ -z $3 ]]; then
- builtin cd $1 $2
- else
- echo cd: too many arguments
- fi
-fi
-}
+++ /dev/null
-#
-# History options
-#
-
-setopt EXTENDED_HISTORY # add a timestamp and the duration of each command
-setopt SHARE_HISTORY # _all_ zsh sessions share the same history files
-setopt HIST_IGNORE_ALL_DUPS # ignores duplications
-
-HISTFILE=~/.zsh/histories/${$(hostname)//.*/}
-HISTSIZE=10000
-SAVEHIST=10000
-
-export HISTFILE HISTSIZE SAVEHIST
+++ /dev/null
-# -*- shell-script -*-
-
-periodic () {
- rehash
-}
-
-export PERIOD=300
-
-###
-# Mail
-
-if [[ -x `which fetchmail` && ! -f ~/.fetchmail.pid && ! -f /tmp/.${USER}.fetchmailnoask ]]
-then
- local ans
- echo -n "Start fetchmail ? [y/n] "
- read -q ans
- if [[ $ans == "y" ]]
- then
- fetchmail
- else
- echo -n "Ask again ? [y/n] "
- read -q ans
- if [[ $ans == "n" ]]
- then
- # I use /tmp since it's purge every reboot
- echo "" >| /tmp/.${USER}.fetchmailnoask
- fi
- fi
-fi
-
-
-###
-# Zftp
-#
-
-# load zftp module
-autoload -U zfinit
-zfinit
-
-# email address for anonymous ftp
-export EMAIL_ADDR=enjoy.zsh@foo.bar
+++ /dev/null
-# -*- shell-script -*-
-#
-# Zsh Options
-#
-
-export LISTPROMPT # in order to scroll if completion list is too big
-
-setopt auto_cd # a commande like % /usr/local is equivalent to cd /usr/local
-setopt nohup # don't send HUP signal when closing term session
-setopt extended_glob # in order to use #, ~ and ^ for filename generation
-setopt always_to_end # move to cursor to the end after completion
-setopt notify # report the status of backgrounds jobs immediately
-setopt correct # try to correct the spelling if possible
-setopt rmstarwait # wait 10 seconds before querying for a rm which contains a *
-setopt printexitvalue # show the exit-value if > 0
-
-# Don't ecrase file with >, use >| (overwrite) or >> (append) instead
-set -C
+++ /dev/null
-if [ $TERM = "screen" ]
-then
- function title {
- # Use these two for GNU Screen:
- local myhost
- myhost=${$(hostname)//.*/}
- print -nR $'\033k'$myhost$'\033'\\
- print -nR $'\033]0;'$1$'\a'
-
- }
-
- preexec ()
- {
- emulate -L zsh
- local -a cmd; cmd=(${(z)1})
- title ${$(hostname)//.*/} "$cmd[1,-1]"
- }
-
- eval "function precmd () {
- $functions[precmd]
- title \$PWD
- }"
-fi
+++ /dev/null
-
-PATH=$PATH:~/.zsh/bin:~/bin:/sbin:/usr/sbin:/usr/local/sbin
-export PATH
-
-[ -d /usr/local/info ] && export INFO_PATH="$INFO_PATH;/usr/local/info"
-
-# vi/vim
-if [ -x `which vim` ]; then
- alias vi="vim"
- export EDITOR=vim
- export VISUAL=vim
-fi
-
-# less
-if [ -x `which less` ]; then
- export PAGER=less
- export LESS="-ir"
-fi
-
-export CVSROOT=:pserver:asyd@localhost:/home/cvs
+++ /dev/null
-# -*- shell-script -*-
-
-# zstyles
-
-# some local variables
-local _myhosts _myuser
-
-_myhosts=($(<~/.zsh/hosts) ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*})
-_myusers=($(<~/.zsh/rc.users))
-
-# Add host and user
-zstyle ':completion:*' users $_myusers
-zstyle ':completion:*' hosts $_myhosts
-
-# Use 'ps -au$USER' for fetch user process list
-zstyle ':completion:*:processes' command 'ps -au$USER'
-
-# Verbose mode
-zstyle ':completion:*:descriptions' format '%B%d%b'
-
-# Use cache
-zstyle ':completion:*' use-cache on
-zstyle ':completion:*' cache-path ~/.zsh/cache
-
-# prevent CVS files/directory completion
-if [ -x `which cvs` ]
-then
- zstyle ':completion:*:(all-|)files' ignored-patterns '(|*/)CVS'
- zstyle ':completion:*:cd:*' ignored-patterns '(*/)#CVS'
-fi
-
-# others zstyle
-zstyle ':completion:*:*:mplayer:*' default-skin MidnightLove
-
-zstyle ':completion:*:*:zless:*' file-patterns '*(-/):directories *.gz:all-files'
-zstyle ':completion:*:*:gqview:*' file-patterns '*(-/):directories :*.(png|jpeg|jpg):all-files'
-zstyle ':completion:*:*:lintian:*' file-patterns '*(-/):directories *.deb'
-
-zstyle ':completion:*:*:less:*' ignored-patterns '*.gz'
-zstyle ':completion:*:*:zcompile:*' ignored-patterns '(*~|*.zwc)'
-
-# few simple completion definitions
-[ -x `which mtr` ] && compdef _hosts mtr
+++ /dev/null
-# this is not useable as a life ~/.zshrc, but you might get one or two ideas
-# from it. So don't blame anyone but yourself if something gets messed up.
-
-autoload -U checkmail # needed for my prompt
-autoload -U colors && colors # make ${f,b}g{,_{,no_}bold} availabl
-autoload -U compinit && compinit # load new completion system
-autoload -U edit-command-line # later bound to C-z e
-autoload -U zed # what, your shell can't edit files?
-autoload -U zmv # who needs mmv or rename?
-bindkey -e # force emacs keybindings no matter what $VISUAL and $EDITOR say
-zmodload zsh/complist
-zmodload zsh/deltochar
-zmodload zsh/mathfunc
-
-# autoload my personal functions
-autoload ${fpath[1]}/*(:t)
-
-# some terminal specific magic
-# look for the zkbd stuff in 'man zshcontrib'
-# note: i renamed and moved the resulting files
-case $TERM in
- linux)
- . ~/.zsh/zkbd/$TERM
- ;;
- screen)
- . ~/.zsh/zkbd/$TERM
- ;;
- gnome*)
- . ~/.zsh/zkbd/$TERM
- ;;
- vt420*)
- . ~/.zsh/zkbd/$TERM
- ;;
- rxvt)
- . ~/.zsh/zkbd/$TERM
- ;;
- xterm*)
- . ~/.zsh/zkbd/$TERM
- ;;
-esac
-
-[[ -z $DISPLAY ]] && setterm -bfreq 100 -blength 50 || resize > /dev/null 2>&1
-
-# some external files
-source ~/.zsh/zsh_alias
-source ~/.zsh/zsh_foo
-source ~/.zsh/zsh_prompt || PROMPT='%n@%m %40<...<%B%~%b%<< $ '
-
-# some options to set
-setopt NO_rm_star_wait
-setopt NO_auto_cd
-setopt correct
-setopt NO_auto_menu
-setopt NO_menucomplete
-setopt autolist
-setopt NO_complete_in_word
-setopt complete_aliases
-setopt NO_mark_dirs
-setopt NO_multios
-setopt notify
-setopt path_dirs
-setopt NO_singlelinezle
-setopt NO_hup
-setopt NO_beep
-setopt NO_nullglob
-setopt extended_glob
-setopt numeric_glob_sort
-setopt NO_check_jobs
-setopt list_packed
-setopt NO_list_rows_first
-setopt bare_glob_qual
-setopt NO_clobber
-setopt histallowclobber
-setopt append_history
-setopt histignorealldups
-setopt histignorespace
-setopt extended_history
-setopt histreduceblanks
-setopt hist_no_store
-setopt NO_hist_verify
-setopt NO_auto_name_dirs
-setopt hash_cmds
-setopt hash_dirs
-setopt pushd_ignore_dups
-setopt NO_pushd_minus
-setopt auto_pushd
-setopt pushd_silent
-setopt pushd_to_home
-[[ $VERSION == 4.1* ]] && setopt auto_continue
-setopt magic_equal_subst
-setopt NO_print_exit_value # don't print exit value if non-zero
-setopt glob_complete # echo *<TAB> -> menu completion
-setopt rc_quotes # print '''' -> '
-setopt ksh_option_print
-setopt rc_expand_param # foo=(1 2);a${foo}b -> 'a1b a2b', not 'a1 b2'
-setopt no_flow_control
-setopt brace_ccl # {a-c} -> 'a b c'
-setopt bsd_echo
-setopt always_last_prompt # necessary for menu selection
-
-# some zle stuff
-autoload _history_complete_word
-autoload history-search-end
-zle -N edit-command-line
-zle -N local-run-help
-zle -N run-as-root
-zle -N run-with-noglob
-zle -N run-as-command
-zle -N run-as-builtin
-zle -N run-without-completion
-zle -N show-history
-zle -N show-dirstack
-zle -N silly-calc
-zle -N zsh-query-replace
-zle -N history-beginning-search-backward-end history-search-end
-zle -N history-beginning-search-forward-end history-search-end
-zle -C lamatch complete-word _generic
-zle -C lappr complete-word _generic
-zle -C lhist complete-word _generic
-zle -C most-recent-file menu-complete _generic
-autoload url-quote-magic
-zle -N self-insert url-quote-magic
-
-# default keymap
-# bindkey -m
-bindkey '^Ze' edit-command-line
-bindkey '^Zg' run-with-noglob
-bindkey '^Zc' run-as-command
-bindkey '^Zb' run-as-builtin
-bindkey '^Zn' run-without-completion
-bindkey '^Zh' show-history
-bindkey '^Zd' show-dirstack
-bindkey '^Xd' delete-to-char
-bindkey '^Xz' zap-to-char
-bindkey '^Xi' lamatch
-bindkey '^Xl' lappr
-bindkey '^Xc' _correct_filename
-bindkey '^Xh' _complete_help
-bindkey '^X?' _complete_debug
-bindkey '^Xr' most-recent-file
-bindkey '^Q' push-line-or-edit
-bindkey '^I' complete-word
-if (( $+key )); then
- bindkey -r ${key[Up]}
- bindkey -r ${key[Down]}
- bindkey -r ${key[Left]}
- bindkey -r ${key[Right]}
-fi
-
-# emacs keymap
-bindkey -M emacs '^W' kill-region
-bindkey -M emacs '^[%' zsh-query-replace
-bindkey -M emacs '^[S' run-as-root
-bindkey -M emacs '^[H' local-run-help
-bindkey -M emacs '^[^M' silly-calc
-bindkey -M emacs '^[n' history-beginning-search-forward-end
-bindkey -M emacs '^[p' history-beginning-search-backward-end
-bindkey -M emacs '^[/' lhist
-bindkey -M emacs '^[Q' delete-to-char
-bindkey -M emacs '^[Z' zap-to-char
-
-autoload -U select-word-style
-select-word-style n
-
-zle -N shell-forward-word forward-word-match
-bindkey -M emacs '\eF' shell-forward-word
-zstyle ':zle:shell-forward-word' word-style shell
-
-zle -N shell-backward-word backward-word-match
-bindkey -M emacs '\eB' shell-backward-word
-zstyle ':zle:shell-backward-word' word-style shell
-
-zle -N shell-kill-word kill-word-match
-bindkey -M emacs '\eD' shell-kill-word
-zstyle ':zle:shell-kill-word' word-style shell
-
-zle -N shell-backward-kill-word backward-kill-word-match
-bindkey -M emacs '\ek' shell-backward-kill-word
-zstyle ':zle:shell-backward-kill-word' word-style shell
-
-# vicmd keymap
-bindkey -M vicmd 'u' undo
-bindkey -M vicmd 'q' delete-to-char
-bindkey -M vicmd '^Q' zap-to-char
-bindkey -M vicmd '^[x' execute-named-cmd
-bindkey -M vicmd '^R' redo
-bindkey -M vicmd '^[a' accept-and-hold
-bindkey -M vicmd 'Q' zsh-query-replace
-
-# viins keymap
-bindkey -M viins '^[x' execute-named-cmd
-bindkey -M viins '^[.' insert-last-word
-bindkey -M viins '^[a' accept-and-hold
-bindkey -M viins '^P' up-line-or-history
-bindkey -M viins '^N' down-line-or-history
-bindkey -M viins '^I' complete-word
-bindkey -r '^Z'
-bindkey -r '^X'
-
-# menu selection
-bindkey '^Zm' menu-select
-bindkey -M menuselect '^P' up-line-or-history
-bindkey -M menuselect '^N' down-line-or-history
-bindkey -M menuselect '^B' backward-char
-bindkey -M menuselect '^F' forward-char
-bindkey -M menuselect '^O' accept-and-infer-next-history
-bindkey -M menuselect '^_' undo
-bindkey -M menuselect '^A' accept-and-menu-complete
-
-# some external commands
-[[ -x =lesspipe ]] && eval $(lesspipe) # set $LESS{OPEN,CLOSE}
-[[ -x =dircolors ]] && eval $(dircolors ~/.dircolors) # set $LS_COLORS
-
-# forgot why i set this :-(
-maildirectory=~/mail
-
-# completion system configuration
-zstyle ':completion:*' completer \
- _complete _match _correct _complete:-extended _prefix \
- _complete:-substring
-zstyle ':completion:*:correct:*' max-errors 0 numeric
-zstyle ':completion:*:correct:*' insert-unambiguous true
-zstyle ':completion:*:correct:*' original false
-zstyle ':completion:*:expand:*' group-order all-expansions expansions
-zstyle ':completion:lappr:*' completer _approximate
-zstyle ':completion:lappr:*:approximate:*' max-errors 3 numeric
-zstyle ':completion:lamatch:*' completer _all_matches
-zstyle ':completion:lamatch:*' old-matches only
-zstyle ':completion:lhist:*' completer _history
-zstyle ':completion:lhist:*' range 1000:10
-zstyle ':completion:*:match:*' match-original non-empty-value
-zstyle ':completion:*' ambiguous true
-zstyle ':completion:*' glob true
-zstyle ':completion:*' word true
-zstyle ':completion:*:-tilde-:*' group-order \
- 'named-directories' 'path-directories' 'users' 'expand'
-zstyle ':completion:*:ssh:*' group-order 'users' 'hosts'
-zstyle ':completion:all-matches:*' old-matches only
-zstyle ':completion:all-matches:*' completer _all_matches
-zstyle ':completion:*:*:(^rm):*:*files' ignored-patterns '*~' '\#*\#' '*.zwc'
-zstyle ':completion:*:(all-|)files' ignored-patterns '(|*/)CVS'
-zstyle ':completion:*:cd:*' ignored-patterns '(*/)#CVS'
-zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))'
-zstyle ':completion:*:-subscript-:*' tag-order indexes parameters
-zstyle ':completion:*:cd:*' tag-order \
- local-directories directory-stack named-directories path-directories
-zstyle ':completion:*:complete-extended:*' matcher-list \
- 'm:{a-z}={A-Z}' 'r:|[+._-]=*'
-zstyle ':completion:*:complete-substring:*' matcher-list \
- 'l:|=**'
-zstyle ':completion:*:mutt:*' users \
- ${${${(f)"$(<~/.mutt_mail_aliases)"}#alias[[:space:]]}%%[[:space:]]*}
-zstyle ':completion:*:urls' urls ~/.zsh/urls
-zstyle ':completion:*:ping:*' hosts host.foo.invalid
- host{{1..5},}.at.some.net.invalid
-zstyle ':completion::*' list-colors ${(s.:.)LS_COLORS}
-zstyle ':completion:*' users-hosts username@localhost \
- user1@host.invalid \
- user2@otherhost.invalid
-zstyle ':completion:*' group-name ''
-zstyle ':completion:*' ignore-parents pwd parent ..
-zstyle ':completion:*' remove-all-dups true
-zstyle ':completion:*' select-scroll -1
-zstyle ':completion:*' special-dirs '..'
-zstyle ':completion:*' use-cache yes
-zstyle ':completion:*' menu select
-zstyle ':completion:*:descriptions' format \
- $'%{\e[0;31m%}completing %d%{\e[0m%}'
-zstyle ':completion:*:corrections' format $'%{\e[0;31m%}%d (errors: %e)%}'
-zstyle ':completion:*' insert-unambiguous true
-zstyle ':completion:*' range 200:20
-zstyle ':completion:*' select-prompt '%SSelect: lines: %L matches: %M [%p]'
-zstyle ':completion:*' sort true
-
-zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
-zstyle ':completion:*:*:rm:*' file-patterns '(*~|\\#*\\#):backup-files' \
- '*.zwc:zsh\ bytecompiled\ files' '(|[a-z]#-[0-9]#-[0-9]#-[0-9]#.)core(|.*):core\ files' '*:all-files'
-zstyle ':completion:*:rm:*' ignore-line true
-zstyle ':completion:*:kill:*' insert-ids single
-zstyle ':completion:*:*:kill:*' menu yes select
-zstyle ':completion:*:kill:*' force-list always
-zstyle ':completion:*' keep-prefix changed
-zstyle ':completion:*:man:*' separate-sections true
-zstyle ':completion:*:mplayer:*:bookmark' mplayer-bookmark ~/.zsh/mplayer-bookmark
-zstyle ':completion:most-recent-file:*' match-original both
-zstyle ':completion:most-recent-file:*' completer _menu _files _match
-zstyle ':completion:most-recent-file:*' file-sort modification
-zstyle ':completion:most-recent-file:*' file-patterns '*(.):normal\ files'
-zstyle ':completion:most-recent-file:*' hidden all
-
-zstyle ':completion:*:xpdf:*' menu true
-zstyle ':completion:*:xpdf:*' file-patterns '*.pdf(.-)' '*(/-)'
-zstyle ':completion:*:xpdf:*' file-sort time
-zstyle ':completion:*:xdvi:*' menu true
-zstyle ':completion:*:xdvi:*' file-patterns '*.dvi(|.gz|.Z)(.-)' '*(/-)'
-zstyle ':completion:*:xdvi:*' file-sort time
-
-compdef _gnu_generic cp mv gpg df stow uname ipacsum fetchipac
-compdef _man pman
+++ /dev/null
-#!/usr/bin/zsh
-# -*- mode: shell-script -*-
-#
-# .zshrc - customisations for the all-powerful shell
-#
-# the latest copy of this file can be found at
-# http://repose.cx/conf
-#
-
-typeset -U path
-path=(~/.bin ~/Muse /sbin /usr/sbin $path)
-
-typeset -U cdpath
-cdpath=(. $cdpath)
-
-setopt nobeep # i hate beeps
-setopt noautomenu # don't cycle completions
-setopt autocd # change to dirs without cd
-#setopt autopushd # automatically append dirs to the push/pop list
-setopt pushdignoredups # and don't duplicate them
-setopt cdablevars # avoid the need for an explicit $
-setopt nocheckjobs # don't warn me about bg processes when exiting
-setopt nohup # and don't kill them, either
-#setopt listpacked # compact completion lists
-setopt nolisttypes # show types in completion
-setopt dvorak # with spelling correction, assume dvorak kb
-setopt extendedglob # weird & wacky pattern matching - yay zsh!
-setopt completeinword # not just at the end
-setopt alwaystoend # when complete from middle, move cursor
-setopt correct # spelling correction
-setopt nopromptcr # don't add \n which overwrites cmds with no \n
-setopt histverify # when using ! cmds, confirm first
-setopt interactivecomments # escape commands so i can use them later
-setopt printexitvalue # alert me if something's failed
-
-# woo! so glad i found this. jump to each element in a path with m-f m-b, same
-# for kill-word, etc.
-export WORDCHARS=''
-
-# history related stuff.
-export HISTSIZE=5000
-export SAVEHIST=5000
-export HISTFILE=~/.zsh_history
-setopt hist_ignore_dups # ignore same commands run twice+
-setopt appendhistory # don't overwrite history
-
-# prompt (if running screen, show window #)
-if [ x$WINDOW != x ]; then
- export PS1="%m[$WINDOW]%# "
-else
- export PS1='%m%# '
-fi
-
-# set up some directory variables. i can then do cd ms to land in my music dir
-# emacs understands these too.
-export m=~/Media/music
-export uni=~/Lib/uni
-export code=~/Lib/code
-export work=~/Lib/work
-: ~m ~uni ~code ~work
-
-# preexec hook shows command in title as it's running, and precmd sets it to
-# something else when it's done. this should work with screen and
-# gnome-terminal2/multi-gnome-terminal
-
-case $TERM in
- xterm*|screen*)
- preexec () {
- export CURRENTCMD="$1"
- if [ x$WINDOW != x ]; then
- print -Pn "\ek$1\e\\"
- else
- print -Pn "\e]0;$1\a"
- fi
- }
- precmd () {
- if [[ ! -z $CURRENTCMD ]]; then
- if [ x$WINDOW != x ]; then
- print -Pn "\ek($CURRENTCMD)\e\\"
- else
- print -Pn "\e]0;($CURRENTCMD)\a"
- fi
- fi
- }
- ;;
-esac
-
-# log out all my ephemeral shells, except the last one
-export TMOUT=60
-
-TRAPALRM () {
- if [ `pwd` = ~ ] && [ x$WINDOW != x ] && (( $WINDOW != 0 )); then
- exit 0
- fi
-}
-
-[[ "$WINDOW" = 0 ]] && setopt ignore_eof
-
-#trap '(( $WINDOW == 0 )) && echo "Last window - type logout" && return 0' EXIT
-
-# this is defined in ~/.bin/e now
-#
-# i have gnuclient set to load files in my current emacs buffer, so i'd like to
-# jump to it afterwards. i use a program "e" to edit files in this manner.
-# e() {
-# sawfish-client -f de-gnuserv-activate > /dev/null
-# # now run gnuclient. we'll be returned to this window when c-x # is hit in
-# # emacs
-# gnuclient $1
-# }
-
-export CVSROOT=~/Lib/CVS
-
-
-# If running interactively, then:
-if [ "$PS1" ]; then
- # colour ls
- eval `dircolors`
- alias ls='ls --color=auto'
-
- # use ssh for rysnc
- export RSYNC_RSH=ssh
-
- # used to have arch-dependent flags, but i kept forgetting to unset cflags
- # before compiling stuff for another box. i don't compile much anymore.
- export CFLAGS="-O2 -fomit-frame-pointer -pipe"
-
- export SmallEiffel="/usr/lib/smalleiffel/sys/system.se"
- export PYTHONPATH="/home/resolve/.python"
- export PYTHONSTARTUP="/home/resolve/.pystartup"
- export SAVEDIR="/home/resolve/.news/"
- export ORGANISATION="Damien Elmes"
-
- export TEXINPUTS=::/usr/local/lib/texmf
-
- export VISUAL=e
- export EDITOR=$VISUAL
-
- # colours in man output, emacs like bindings. nifty.
- export PAGER=most
-
- # anti aliasing in the two toolkits
- export QT_XFT=1
- export GDK_USE_XFT=1
-
- alias go-wl="sudo ifdown eth0; sudo /etc/init.d/pcmcia start"
- alias go-eth="sudo /etc/init.d/pcmcia stop; sudo ifup eth0"
- alias nw="sfsagent resolve@respite; ls .mail > /dev/null 2>&1"
-
- # display reminders
- [ -f .r ] && cat .r
-
- umask 022
-
-#
-# completion tweaking
-#
-
-# complete hostnames out of ssh's ~/.ssh/known_hosts
- autoload -U compinit; compinit
- zstyle ':completion:*' use-cache on
- zstyle ':completion:*' users resolve
- hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*})
- zstyle ':completion:*:hosts' hosts $hosts
-
-# use dircolours in completion listings
- zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
-
-# allow approximate matching
- zstyle ':completion:*' completer _complete _match _approximate
- zstyle ':completion:*:match:*' original only
- zstyle ':completion:*:approximate:*' max-errors 1 numeric
- zstyle ':completion:*' auto-description 'Specify: %d'
- zstyle ':completion:*' format 'Completing %d'
- zstyle ':completion:*' verbose true
- zstyle ':completion:*:functions' ignored-patterns '_*'
- zstyle ':completion:*:*:(^rm):*:*files' ignored-patterns \
- '*?.(o|c~|zwc)' '*?~'
-
- bindkey "\C-w" kill-region
-
-fi
-
-# evaluate work related stuff
-[ -f .workrc ] && . ~/.workrc
-
-if [ x$TERM = xscreen ]; then
- export TERM=xterm
-fi
+++ /dev/null
-# Filename: .zshrc
-# Purpose: config file for zsh
-# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
-# Bug-Reports: see http://grml.org/bugs/
-# License: This file is licensed under the GPL v2.
-# Latest change: Son Jun 05 21:06:19 CEST 2005 [mika]
-################################################################################
-
-# See /etc/zsh/zshrc for some general settings
-
-## variables {{{
-
-# set terminal property (used e.g. by msgid-chooser)
- export COLORTERM="yes"
-
-# set default browser
- (( ${+BROWSER} )) || export BROWSER="w3m"
- (( ${+PAGER} )) || export PAGER="less"
-# }}}
-
-## set options {{{
-
-# Allow comments even in interactive shells i. e.
-# $ uname # This command prints system informations
-# zsh: bad pattern: #
-# $ setopt interactivecomments
-# $ uname # This command prints system informations
-# Linux
-# setopt interactivecomments
-
-# }}}
-
-# {{{ global aliases
-# These do not have to be at the beginning of the command line.
-# Avoid typing cd ../../ for going two dirs down and so on
-# Usage, e.g.: "$ cd ...' or just '$ ...' with 'setopt auto_cd'
- alias -g '...'='../..'
- alias -g '....'='../../..'
-# Usage is "$ somecommand C (this pipes it into 'wc -l'):
- alias -g BG='& exit'
- alias -g C='|wc -l'
- alias -g G='|grep'
- alias -g H='|head'
- alias -g Hl=' --help |& less -r'
- alias -g K='|keep'
- alias -g L='|less'
- alias -g M='|most'
- alias -g N='&>/dev/null'
- alias -g R='| tr A-z N-za-m'
- alias -g SL='| sort | less'
- alias -g S='| sort'
- alias -g T='|tail'
- alias -g V='| vim -'
-# }}}
-
-## aliases {{{
-
-# general
- alias da='du -sch'
- alias j='jobs -l'
-# alias u='translate -i' # translate
-
-# compile stuff
- alias CO="./configure"
- alias CH="./configure --help"
-
-# http://conkeror.mozdev.org/
- alias conkeror='firefox -chrome chrome://conkeror/content'
-
-# arch/tla stuff
- alias ldiff='tla what-changed --diffs | less'
- alias tbp='tla-buildpackage'
- alias mirror='tla archive-mirror'
- alias commit='tla commit'
- alias merge='tla star-merge'
-
-# listing stuff
- alias dir="ls -lSrah"
- alias lad='ls -d .*(/)' # only show dot-directories
- alias lsa='ls -a .*(.)' # only show dot-files
- alias lss='ls -l *(s,S,t)' # only files with setgid/setuid/sticky flag
- alias lsl='ls -l *(@[1,10])' # only symlinks
- alias lsx='ls -l *(*[1,10])' # only executables
- alias lsw='ls -ld *(R,W,X.^ND/)' # world-{readable,writable,executable} files
- alias lsbig="ls -flh *(.OL[1,10])" # display the biggest files
- alias lsd='ls -d *(/)' # only show directories
- alias lse='ls -d *(/^F)' # only show empty directories
- alias lsnew="ls -rl *(D.om[1,10])" # display the newest files
- alias lsold="ls -rtlh *(D.om[1,10])" # display the oldest files
- alias lssmall="ls -Srl *(.oL[1,10])" # display the smallest files
-
-# chmod
- alias rw-='chmod 600'
- alias rwx='chmod 700'
- alias r--='chmod 644'
- alias r-x='chmod 755'
-
-# some useful aliases
- alias md='mkdir -p'
-
-# console stuff
- alias cmplayer='mplayer -vo fbdev'
- alias fbmplayer='mplayer -vo fbdev'
- alias fblinks='links2 -driver fb'
-
-# use colors when browsing man pages (if not using pinfo or PAGER=most)
- [ -d ~/.terminfo/ ] && alias man='TERMINFO=~/.terminfo/ LESS=C TERM=mostlike PAGER=less man'
-
-# }}}
-
-## useful functions {{{
-
-# functions without detailed explanation:
- agoogle() { $BROWSER "http://groups.google.com/groups?as_uauthors=$*" ; }
- bk() { cp -b ${1} ${1}_`date --iso-8601=m` }
- cdiff() { diff -crd "$*" | egrep -v "^Only in |^Binary files " }
- cl() { cd $1 && ls -a } # cd && ls
- cvsa() { cvs add $* && cvs com -m 'initial checkin' $* }
- cvsd () { cvs diff -N $* |& $PAGER }
- cvsl () { cvs log $* |& $PAGER }
- cvsq () { cvs -nq update }
- cvsr () { rcs2log $* | $PAGER }
- cvss () { cvs status -v $* }
- debbug () { $BROWSER "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=$*" }
- disassemble(){ gcc -pipe -S -o - -O -g $* | as -aldh -o /dev/null }
- dwicti() { $BROWSER http://de.wiktionary.org/wiki/${(C)1// /_} }
- ewicti() { $BROWSER http://en.wiktionary.org/wiki/${(C)1// /_} }
- ggogle() { $BROWSER "http://groups.google.com/groups?q=$*" }
- google() { $BROWSER "http://www.google.com/search?&num=100&q=$*" }
- leo() { $BROWSER "http://dict.leo.org/?search=$*" }
- mdiff() { diff -udrP "$1" "$2" > diff.`date "+%Y-%m-%d"`."$1" }
- memusage(){ ps aux | awk '{if (NR > 1) print $5; if (NR > 2) print "+"} END { print "p" }' | dc }
- mggogle() { $BROWSER "http://groups.google.com/groups?selm=$*" }
- shtar() { gunzip -c $1 | tar -tf - -- | $PAGER }
- shtgz() { tar -ztf $1 | $PAGER }
- shzip() { unzip -l $1 | $PAGER }
- sig() { agrep -d '^-- $' "$*" ~/.Signature }
- udiff() { diff -urd $* | egrep -v "^Only in |^Binary files " }
- wikide() { $BROWSER http://de.wikipedia.org/wiki/"$*" }
- wikien() { $BROWSER http://en.wikipedia.org/wiki/"$*" }
-
-# debian upgrade
- upgrade () {
- if [ -z $1 ] ; then
- sudo apt-get update
- sudo apt-get -u upgrade
- else
- ssh $1 sudo apt-get update
- # ask before the upgrade
- local dummy
- ssh $1 sudo apt-get --no-act upgrade
- echo -n "Process the upgrade ?"
- read -q dummy
- if [[ $dummy == "y" ]] ; then
- ssh $1 sudo apt-get -u upgrade --yes
- fi
- fi
- }
-
-# make screenshot of current desktop (use 'import' from ImageMagic)
- sshot() {
- [[ ! -d ~/shots ]] && mkdir ~/shots
- #cd ~/shots ; sleep 5 ; import -window root -depth 8 -quality 80 `date "+%Y-%m-%d--%H:%M:%S"`.png
- cd ~/shots ; sleep 5; import -window root shot_`date --iso-8601=m`.jpg
- }
-
-# create pdf file from source code
- makereadable() {
- output=$1
- shift
- a2ps --medium A4dj -E -o $output $*
- ps2pdf $output
- }
-
-# zsh with perl-regex - use it e.g. via:
-# regcheck '\s\d\.\d{3}\.\d{3} Euro' ' 1.000.000 Euro'
- regcheck() {
- zmodload -i zsh/pcre
- pcre_compile $1 && \
- pcre_match $2 && echo "regex matches" || echo "regex does not match"
- }
-# list files which have been modified within the last x days
- new() { print -l *(m-$1) }
-
-# grep the history
- greph () { history 0 | grep $1 }
- alias grepc='grep --color=auto'
- alias GREP='grep -i --color=auto'
-
-# one blank line between each line
- man2() { PAGER='sed G | less' /usr/bin/man $* ; }
-
-# provide useful information on globbing
- H-Glob() {
- echo -e "
- / directories
- . plain files
- @ symbolic links
- = sockets
- p named pipes (FIFOs)
- * executable plain files (0100)
- % device files (character or block special)
- %b block special files
- %c character special files
- r owner-readable files (0400)
- w owner-writable files (0200)
- x owner-executable files (0100)
- A group-readable files (0040)
- I group-writable files (0020)
- E group-executable files (0010)
- R world-readable files (0004)
- W world-writable files (0002)
- X world-executable files (0001)
- s setuid files (04000)
- S setgid files (02000)
- t files with the sticky bit (01000)
- print *(m-1) # Dateien, die vor bis zu einem Tag modifiziert wurden.
- print *(a1) # Dateien, auf die vor einem Tag zugegriffen wurde.
- print *(@) # Nur Links
- print *(Lk+50) # Dateien die ueber 50 Kilobytes grosz sind
- print *(Lk-50) # Dateien die kleiner als 50 Kilobytes sind
- print **/*.c # Alle *.c - Dateien unterhalb von \$PWD
- print **/*.c~file.c # Alle *.c - Dateien, aber nicht 'file.c'
- print (foo|bar).* # Alle Dateien mit 'foo' und / oder 'bar' am Anfang
- print *~*.* # Nur Dateien ohne '.' in Namen
- chmod 644 *(.^x) # make all non-executable files publically readable
- print -l *(.c|.h) # Nur Dateien mit dem Suffix '.c' und / oder '.h'
- print **/*(g:users:) # Alle Dateien/Verzeichnisse der Gruppe >users<
- echo /proc/*/cwd(:h:t:s/self//) # Analog zu >ps ax | awk '{print $1}'<"
- }
-
- lcheck() {
- nm -go /usr/lib/lib*.a 2>/dev/null | grep ":[[:xdigit:]]\{8\} . .*$1"":[[:xdigit:]]\{8\} . .*$1"
- }
-
-# clean up directory
- purge() {
- FILES=(*~(N) .*~(N) \#*\#(N) *.o(N) a.out(N) *.core(N) *.cmo(N) *.cmi(N) .*.swp(N))
- NBFILES=${#FILES}
- if [[ $NBFILES > 0 ]]; then
- print $FILES
- local ans
- echo -n "Remove this files? [y/n] "
- read -q ans
- if [[ $ans == "y" ]]
- then
- rm ${FILES}
- echo ">> $PWD purged, $NBFILES files removed"
- else
- echo "Ok. .. than not.."
- fi
- fi
- }
-
-# Translate DE<=>EN
-# 'translate' looks up fot a word in a file with language-to-language
-# translations (field separator should be " : "). A typical wordlist looks
-# like at follows:
-# | english-word : german-transmission
-# It's also only possible to translate english to german but not reciprocal.
-# Use the following oneliner to turn back the sort order:
-# $ awk -F ':' '{ print $2" : "$1" "$3 }' \
-# /usr/local/lib/words/en-de.ISO-8859-1.vok > ~/.translate/de-en.ISO-8859-1.vok
- trans() {
- case "$1" in
- -[dD]*) translate -l de-en $2
- ;;
- -[eE]*) translate -l en-de $2
- ;;
- *)
- echo "Usage: $0 { -D | -E }"
- echo " -D == German to English"
- echo " -E == English to German"
- esac
- }
-
-# Some quick Perl-hacks aka /useful/ oneliner
-# bew() { perl -le 'print unpack "B*","'$1'"' }
-# web() { perl -le 'print pack "B*","'$1'"' }
-# hew() { perl -le 'print unpack "H*","'$1'"' }
-# weh() { perl -le 'print pack "H*","'$1'"' }
-# pversion() { perl -M$1 -le "print $1->VERSION" } # i. e."pversion LWP -> 5.79"
-# getlinks () { perl -ne 'while ( m/"((www|ftp|http):\/\/.*?)"/gc ) { print $1, "\n"; }' $* }
-# gethrefs () { perl -ne 'while ( m/href="([^"]*)"/gc ) { print $1, "\n"; }' $* }
-# getanames () { perl -ne 'while ( m/a name="([^"]*)"/gc ) { print $1, "\n"; }' $* }
-# getforms () { perl -ne 'while ( m:(\</?(input|form|select|option).*?\>):gic ) { print $1, "\n"; }' $* }
-# getstrings () { perl -ne 'while ( m/"(.*?)"/gc ) { print $1, "\n"; }' $*}
-# getanchors () { perl -ne 'while ( m/«([^«»\n]+)»/gc ) { print $1, "\n"; }' $* }
-# showINC () { perl -e 'for (@INC) { printf "%d %s\n", $i++, $_ }' }
-# vimpm () { vim `perldoc -l $1 | sed -e 's/pod$/pm/'` }
-# vimhelp () { vim -c "help $1" -c on -c "au! VimEnter *" }
-
-# plap foo -- list all occurrences of program in the current PATH
- plap() {
- if [[ $# = 0 ]]
- then
- echo "Usage: $0 program"
- echo "Example: $0 zsh"
- echo "Lists all occurrences of program in the current PATH."
- else
- ls -l ${^path}/*$1*(*N)
- fi
- }
-
-# Found in the mailinglistarchive from Zsh (IIRC ~1996)
- selhist() {
- emulate -L zsh
- local TAB=$'\t';
- (( $# < 1 )) && {
- echo "Usage: $0 command"
- return 1
- };
- cmd=(${(f)"$(grep -w $1 $HISTFILE | sort | uniq | pr -tn)"})
- print -l $cmd | less -F
- echo -n "enter number of desired command [1 - $(( ${#cmd[@]} - 1 ))]: "
- local answer
- read answer
- print -z "${cmd[$answer]#*$TAB}"
- }
-
-# mkdir && cd
- mcd() { mkdir -p "$@"; cd "$@" } # mkdir && cd
-
-# cd && ls
- cl() { cd $1 && ls -a }
-
-# Use vim to convert plaintext to HTML
- 2html() { vim -u NONE -n -c ':syntax on' -c ':so $VIMRUNTIME/syntax/2html.vim' -c ':wqa' $1 > /dev/null 2> /dev/null }
-
-# Usage: simple-extract <file>
-# Description: extracts archived files (maybe)
- simple-extract () {
- if [[ -f $1 ]]
- then
- case $1 in
- *.tar.bz2) bzip2 -v -d $1 ;;
- *.tar.gz) tar -xvzf $1 ;;
- *.rar) unrar $1 ;;
- *.deb) ar -x $1 ;;
- *.bz2) bzip2 -d $1 ;;
- *.lzh) lha x $1 ;;
- *.gz) gunzip -d $1 ;;
- *.tar) tar -xvf $1 ;;
- *.tgz) gunzip -d $1 ;;
- *.tbz2) tar -jxvf $1 ;;
- *.zip) unzip $1 ;;
- *.Z) uncompress $1 ;;
- *) echo "'$1' Error. Please go away" ;;
- esac
- else
- echo "'$1' is not a valid file"
- fi
- }
-
-# Usage: smartcompress <file> (<type>)
-# Description: compresses files or a directory. Defaults to tar.gz
- smartcompress() {
- if [ $2 ]; then
- case $2 in
- tgz | tar.gz) tar -zcvf$1.$2 $1 ;;
- tbz2 | tar.bz2) tar -jcvf$1.$2 $1 ;;
- tar.Z) tar -Zcvf$1.$2 $1 ;;
- tar) tar -cvf$1.$2 $1 ;;
- gz | gzip) gzip $1 ;;
- bz2 | bzip2) bzip2 $1 ;;
- *)
- echo "Error: $2 is not a valid compression type"
- ;;
- esac
- else
- smartcompress $1 tar.gz
- fi
- }
-
-# Usage: show-archive <archive>
-# Description: view archive without unpack
- show-archive() {
- if [[ -f $1 ]]
- then
- case $1 in
- *.tar.gz) gunzip -c $1 | tar -tf - -- ;;
- *.tar) tar -tf $1 ;;
- *.tgz) tar -ztf $1 ;;
- *.zip) unzip -l $1 ;;
- *.bz2) bzless $1 ;;
- *) echo "'$1' Error. Please go away" ;;
- esac
- else
- echo "'$1' is not a valid archive"
- fi
- }
-
- folsym() {
- if [[ -e $1 || -h $1 ]]; then
- file=$1
- else
- file=`which $1`
- fi
- if [[ -e $file || -L $file ]]; then
- if [[ -L $file ]]; then
- echo `ls -ld $file | perl -ane 'print $F[7]'` '->'
- folsym `perl -le '$file = $ARGV[0];
- $dest = readlink $file;
- if ($dest !~ m{^/}) {
- $file =~ s{(/?)[^/]*$}{$1$dest};
- } else {
- $file = $dest;
- }
- $file =~ s{/{2,}}{/}g;
- while ($file =~ s{[^/]+/\.\./}{}) {
- ;
- }
- $file =~ s{^(/\.\.)+}{};
- print $file' $file`
- else
- ls -d $file
- fi
- else
- echo $file
- fi
- }
-
-# Use 'view' to read manpages, if u want colors, regex - search, ...
-# like vi(m).
-# It's shameless stolen from <http://www.vim.org/tips/tip.php?tip_id=167>
- vman() { man $* | col -b | view -c 'set ft=man nomod nolist' - }
-
-# search for various types or README file in dir and display them in $PAGER
-# function readme() { $PAGER -- (#ia3)readme* }
- readme() {
- local files
- files=(./(#i)*(read*me|lue*m(in|)ut)*(ND))
- if (($#files))
- then $PAGER $files
- else
- print 'No README files.'
- fi
- }
-
-# find all suid files in $PATH
- suidfind() { ls -latg $path | grep '^...s' }
-
-# See above but this is /better/ ... anywise ..
-# Note: Add $USER and 'find' with "NOPASSWD" in your /etc/sudoers or run it
-# as root (UID == 0)
- findsuid() {
- if [ UID != 0 ] ; then
- print 'Not running as root. Trying to run via sudo...'
- RUNASROOT=sudo
- fi
- print 'Output will be written to ~/suid_* ...'
- $RUNASROOT find / -type f \( -perm -4000 -o -perm -2000 \) -ls > ~/suid_suidfiles.`date "+%Y-%m-%d"`.out 2>&1
- $RUNASROOT find / -type d \( -perm -4000 -o -perm -2000 \) -ls > ~/suid_suiddirs.`date "+%Y-%m-%d"`.out 2>&1
- $RUNASROOT find / -type f \( -perm -2 -o -perm -20 \) -ls > ~/suid_writefiles.`date "+%Y-%m-%d"`.out 2>&1
- $RUNASROOT find / -type d \( -perm -2 -o -perm -20 \) -ls > ~/suid_writedirs.`date "+%Y-%m-%d"`.out 2>&1
- print 'Finished'
- }
-
-# Reload functions.
- refunc() {
- for func in $argv
- do
- unfunction $func
- autoload $func
- done
- }
-
-# a small check to see which DIR is located on which server/partition.
-# stolen and modified from Sven's zshrc.forall
- dirspace() {
- for dir in $path;
- do
- (cd $dir; echo "-<$dir>"; du -shx .; echo);
- done
- }
-
-# $ show_print `cat /etc/passwd`
- slow_print() {
- for argument in "${@}"
- do
- for ((i = 1; i <= ${#1} ;i++)) {
- print -n "${argument[i]}"
- sleep 0.08
- }
- print -n " "
- done
- print ""
- }
-
- status() {
- print ""
- print "Date..: "$(date "+%Y-%m-%d %H:%M:%S")""
- print "Shell.: Zsh $ZSH_VERSION (PID = $$, $SHLVL nests)"
- print "Term..: $TTY ($TERM), $BAUD bauds, $COLUMNS x $LINES cars"
- print "Login.: $LOGNAME (UID = $EUID) on $HOST"
- print "System: $(cat /etc/[A-Za-z]*[_-][rv]e[lr]*)"
- print "Uptime:$(uptime)"
- print ""
- }
-
- audiorip() {
- mkdir -p ~/ripps
- cd ~/ripps
- cdrdao read-cd --device $DEVICE --driver generic-mmc audiocd.toc
- cdrdao read-cddb --device $DEVICE --driver generic-mmc audiocd.toc
- echo " * Would you like to burn the cd now? (yes/no)"
- read input
- if
- [ "$input" = "yes" ]; then
- echo " ! Burning Audio CD"
- audioburn
- echo " * done."
- else
- echo " ! Invalid response."
- fi
- }
-
- audioburn() {
- cd ~/ripps
- cdrdao write --device $DEVICE --driver generic-mmc audiocd.toc
- echo " * Should I remove the temporary files? (yes/no)"
- read input
- if [ "$input" = "yes" ]; then
- echo " ! Removing Temporary Files."
- cd ~
- rm -rf ~/ripps
- echo " * done."
- else
- echo " ! Invalid response."
- fi
- }
-
- mkaudiocd() {
- cd ~/ripps
- for i in *.[Mm][Pp]3; do mv "$i" `echo $i | tr '[A-Z]' '[a-z]'`; done
- for i in *.mp3; do mv "$i" `echo $i | tr ' ' '_'`; done
- for i in *.mp3; do mpg123 -w `basename $i .mp3`.wav $i; done
- normalize -m *.wav
- for i in *.wav; do sox $i.wav -r 44100 $i.wav resample; done
- }
-
- mkiso() {
- echo " * Volume name "
- read volume
- echo " * ISO Name (ie. tmp.iso)"
- read iso
- echo " * Directory or File"
- read files
- mkisofs -o ~/$iso -A $volume -allow-multidot -J -R -iso-level 3 -V $volume -R $files
- }
-
-# generate thumbnails ;)
- genthumbs () {
- rm -rf thumb-* index.html
- echo "
-<html>
- <head>
- <title>Images</title>
- </head>
- <body>" > index.html
- for f in *.(gif|jpeg|jpg|png)
- do
- convert -size 100x200 "$f" -resize 100x200 thumb-"$f"
- echo " <a href=\"$f\"><img src=\"thumb-$f\"></a>" >> index.html
- done
- echo "
- </body>
-</html>" >> index.html
- }
-
-# unset all limits (see zshbuiltins(1) /ulimit for details)
- allulimit() {
- ulimit -c unlimited
- ulimit -d unlimited
- ulimit -f unlimited
- ulimit -l unlimited
- ulimit -n unlimited
- ulimit -s unlimited
- ulimit -t unlimited
- }
-
-# ogg2mp3 with bitrate of 192
-ogg2mp3_192() {
- oggdec -o - ${1} | lame -b 192 - ${1:r}.mp3
-}
-
-# }}}
-
-# some useful commands often hard to remember - let's grep for them {{{
-
-# enable jackd:
-# /usr/bin/jackd -dalsa -dhw:0 -r48000 -p1024 -n2
-# now play audio file:
-# alsaplayer -o jack foobar.mp3
-
-# send files via netcat
-# on sending side:
-# send() {j=$*; tar cpz ${j/%${!#}/}|nc -w 1 ${!#} 51330;}
-# send dir* $HOST # alias receive='nc -vlp 51330 | tar xzvp'
-
-# debian stuff:
-# dh_make -e foo@localhost -f $1
-# dpkg-buildpackage -rfakeroot
-# lintian *.deb
-# dpkg-scanpackages ./ /dev/null | gzip > Packages.gz
-# dpkg-scansources . | gzip > Sources.gz
-# grep-dctrl --field Maintainer $* /var/lib/apt/lists/*
-
-# other stuff:
-# convert -geometry 200x200 -interlace LINE -verbose
-# ldapsearch -x -b "OU=Bedienstete,O=tug" -h ldap.tugraz.at sn=$1
-# ps -ao user,pcpu,start,command
-# gpg --keyserver blackhole.pca.dfn.de --recv-keys
-# xterm -bg black -fg yellow -fn -misc-fixed-medium-r-normal--14-140-75-75-c-90-iso8859-15 -ah
-# nc -vz $1 1-1024 # portscan via netcat
-# wget --mirror --no-parent --convert-links
-# pal -d `date +%d`
-# autoload -U tetris; zle -N tetris; bindkey '...' ; echo "press ... for playing tennis"
-# }}}
-## END OF FILE #################################################################
-# vim:foldmethod=marker
+++ /dev/null
-# Filename: /etc/zsh/keephack
-# Purpose: this file belongs to the zsh setup (see /etc/zsh/zshrc)
-# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
-# Bug-Reports: see http://grml.org/bugs/
-# License: This file is licensed under the GPL v2.
-# Latest change: Don Jän 27 23:38:57 CET 2005 [mika]
-################################################################################
-
-# save output in a variable for later use
-# Written by Bart Schaefer, for more details see:
-# http://www.zsh.org/cgi-bin/mla/wilma_hiliter/users/2004/msg00894.html ff.
- function keep {
- setopt localoptions nomarkdirs nonomatch nocshnullglob nullglob
- kept=() # Erase old value in case of error on next line
- kept=($~*)
- if [[ ! -t 0 ]]; then
- local line
- while read line; do
- kept+=( $line ) # += is a zsh 4.2+ feature
- done
- fi
- print -Rc - ${^kept%/}(T)
- }
- # use it via:
- # locate -i backup | grep -i thursday | keep
- # echo $kept
- #
- # or:
- #
- # patch < mypatch.diff
- # keep **/*.(orig|rej)
- # vim ${${kept:#*.orig}:r}
- # rm $kept
- alias keep='noglob keep'
-
- _insert_kept() {
- (( $#kept )) || return 1
- local action
- zstyle -s :completion:$curcontext insert-kept action
- if [[ -n $action ]]
- then compstate[insert]=$action
- elif [[ $WIDGET = *expand* ]]
- then compstate[insert]=all
- fi
- if [[ $WIDGET = *expand* ]]
- then compadd -U ${(M)kept:#${~words[CURRENT]}}
- else compadd -a kept
- fi
- }
-
- # now bind it to keys and enable completition
- zle -C insert-kept-result complete-word _generic
- zle -C expand-kept-result complete-word _generic
- zstyle ':completion:*-kept-result:*' completer _insert_kept
- zstyle ':completion:insert-kept-result:*' menu yes select
-
- bindkey '^Xk' insert-kept-result
- bindkey '^XK' expand-kept-result # shift-K to get expansion
-
- # And the "_expand_word_and_keep" replacement for _expand_word:
- _expand_word_and_keep() {
- function compadd() {
- local -A args
- zparseopts -E -A args J:
- if [[ $args[-J] == all-expansions ]]
- then
- builtin compadd -A kept "$@"
- kept=( ${(Q)${(z)kept}} )
- fi
- builtin compadd "$@"
- }
- # for older versions of zsh:
- local result
- _main_complete _expand
- result=$?
- unfunction compadd
- return result
- # versions >=4.2.1 understand this:
- # { _main_complete _expand } always { unfunction compadd }
- }
-
- # This line must come after "compinit" in startup:
- zle -C _expand_word complete-word _expand_word_and_keep
- # No bindkey needed, it's already ^Xe from _expand_word
- zstyle ':completion:*' insert-kept menu
- zmodload -i zsh/complist
-
-## END OF FILE #################################################################
+++ /dev/null
-# Frlename: zshrc
-# Purpose: config file for zsh (z shell)
-# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
-# Bug-Reports: see http://grml.org/bugs/
-# License: This file is licensed under the GPL v2.
-# Latest change: Die Mai 31 15:28:47 CEST 2005 [mika]
-################################################################################
-# This file is sourced only for interactive shells. It
-# should contain commands to set up aliases, functions,
-# options, key bindings, etc.
-#
-# Global Order: zshenv, zprofile, zshrc, zlogin
-################################################################################
-
-# {{{ check for version/system
-# check for versions (compatibility reasons)
- is4(){
- if [[ $ZSH_VERSION == 4.* ]]; then
- return 0
- else
- return 1
- fi
- }
-
-# current release
- is42(){
- if [[ $ZSH_VERSION == 4.<2->* ]]; then
- return 0
- else
- return 1
- fi
- }
-
-# grml specific stuff
- isgrml(){
- if [ -f /etc/grml_version ] ; then
- return 0
- else
- return 1
- fi
- }
-
- isgrmlcd(){
- if [ -f /etc/grml_cd ] ; then
- return 0
- else
- return 1
- fi
- }
-
-# change directory to home on first invocation of zsh
-# important for rungetty -> autologin
-# Thanks go to Bart Schaefer!
- isgrml && checkhome() {
- if [[ -z "$ALREADY_DID_CD_HOME" ]]; then
- export ALREADY_DID_CD_HOME=$HOME
- cd
- fi
- }
-# }}}
-
-# {{{ set some variables
- [[ -z "$EDITOR" ]] && EDITOR='vim'
- [[ -z "$SHELL" ]] && SHELL='/bin/zsh'
- [[ -f ~/.terminfo/m/mostlike ]] && MYLESS='LESS=C TERMINFO=~/.terminfo TERM=mostlike less' || MYLESS='less'
- eval `dircolors -b`
-
-# Search path for the cd comman
-# cdpath=(.. ~)
-
-# automatically remove duplicates from these arrays
- typeset -U path cdpath fpath manpath
-# }}}
-
-# {{{ keybindings
-if [[ "$TERM" != emacs ]]; then
- [[ -z "$terminfo[kdch1]" ]] || bindkey -M emacs "$terminfo[kdch1]" delete-char
- [[ -z "$terminfo[khome]" ]] || bindkey -M emacs "$terminfo[khome]" beginning-of-line
- [[ -z "$terminfo[kend]" ]] || bindkey -M emacs "$terminfo[kend]" end-of-line
- [[ -z "$terminfo[kdch1]" ]] || bindkey -M vicmd "$terminfo[kdch1]" vi-delete-char
- [[ -z "$terminfo[khome]" ]] || bindkey -M vicmd "$terminfo[khome]" vi-beginning-of-line
- [[ -z "$terminfo[kend]" ]] || bindkey -M vicmd "$terminfo[kend]" vi-end-of-line
-
- [[ -z "$terminfo[cuu1]" ]] || bindkey -M viins "$terminfo[cuu1]" vi-up-line-or-history
- [[ -z "$terminfo[cuf1]" ]] || bindkey -M viins "$terminfo[cuf1]" vi-forward-char
- [[ -z "$terminfo[kcuu1]" ]] || bindkey -M viins "$terminfo[kcuu1]" vi-up-line-or-history
- [[ -z "$terminfo[kcud1]" ]] || bindkey -M viins "$terminfo[kcud1]" vi-down-line-or-history
- [[ -z "$terminfo[kcuf1]" ]] || bindkey -M viins "$terminfo[kcuf1]" vi-forward-char
- [[ -z "$terminfo[kcub1]" ]] || bindkey -M viins "$terminfo[kcub1]" vi-backward-char
-
-# ncurses fogyatekos
- [[ "$terminfo[kcuu1]" == "\eO"* ]] && bindkey -M viins "${terminfo[kcuu1]/O/[}" vi-up-line-or-history
- [[ "$terminfo[kcud1]" == "\eO"* ]] && bindkey -M viins "${terminfo[kcud1]/O/[}" vi-down-line-or-history
- [[ "$terminfo[kcuf1]" == "\eO"* ]] && bindkey -M viins "${terminfo[kcuf1]/O/[}" vi-forward-char
- [[ "$terminfo[kcub1]" == "\eO"* ]] && bindkey -M viins "${terminfo[kcub1]/O/[}" vi-backward-char
- [[ "$terminfo[khome]" == "\eO"* ]] && bindkey -M viins "${terminfo[khome]/O/[}" beginning-of-line
- [[ "$terminfo[kend]" == "\eO"* ]] && bindkey -M viins "${terminfo[kend]/O/[}" end-of-line
- [[ "$terminfo[khome]" == "\eO"* ]] && bindkey -M emacs "${terminfo[khome]/O/[}" beginning-of-line
- [[ "$terminfo[kend]" == "\eO"* ]] && bindkey -M emacs "${terminfo[kend]/O/[}" end-of-line
-fi
-
-## keybindings (run 'bindkeys' for details, more details via man zshzle)
-# use emacs style per default
- bindkey -e
-# use vi style:
-# bindkey -v
-
-#if [[ "$TERM" == screen ]]; then
- bindkey '\e[1~' beginning-of-line # home
- bindkey '\e[4~' end-of-line # end
- bindkey "^[[A" up-line-or-search # cursor up
- bindkey "^[[B" down-line-or-search # <ESC>-
- bindkey '^x' history-beginning-search-backward
-#fi
-# bindkey '\eq' push-line-or-edit
-# }}}
-
-# {{{ autoloading
- autoload -U zmv # who needs mmv or rename?
- autoload history-search-end
-
- alias run-help >&/dev/null && unalias run-help
- autoload run-help # use via 'esc-h'
-
- is4 && autoload -U compinit && compinit # completition system
- is4 && autoload -U zed # use ZLE editor to edit a file or function
-
- is4 && zmodload -i zsh/complist
- is4 && zmodload -i zsh/deltochar
- is4 && zmodload -i zsh/mathfunc
-# Autoload zsh modules when they are referenced
- is4 && zmodload -a zsh/stat stat
- is4 && zmodload -a zsh/zpty zpty
- is4 && zmodload -a zsh/zprof zprof
- is4 && zmodload -ap zsh/mapfile mapfile
-
- is4 && autoload -U insert-files && \
- zle -N insert-files && \
- bindkey "^Xf" insert-files # C-x-f
-
- bindkey ' ' magic-space # also do history expansion on space
-
-# press Esc-e for editing command line in $EDITOR or $VISUAL
- is4 && autoload -U edit-command-line && \
- zle -N edit-command-line && \
- bindkey '\ee' edit-command-line
-
-# press Esc-m for inserting last typed word again (thanks to caphuso!)
- insert-last-typed-word() { zle insert-last-word -- 0 -1 }; \
- zle -N insert-last-typed-word; bindkey "\em" insert-last-typed-word
-
-# set command prediction from history, see 'man 1 zshcontrib'
- is4 && autoload -U predict-on && \
- zle -N predict-on && \
- zle -N predict-off && \
- bindkey "^X^Z" predict-on && \
- bindkey "^Z" predict-off
-# }}}
-
-# {{{ set some important options
- umask 022
-
-# history:
- setopt append_history # append history list to the history file (important for multiple parallel zsh sessions!)
- is4 && setopt SHARE_HISTORY # import new commands from the history file also in other zsh-session
- setopt extended_history # save each command's beginning timestamp and the duration to the history file
- is4 && setopt histignorealldups # If a new command line being added to the history
- # list duplicates an older one, the older command is removed from the list
- setopt histignorespace # remove command lines from the history list when
- # the first character on the line is a space
- setopt histallowclobber # add `|' to output redirections in the history
-
- setopt auto_cd # if a command is issued that can't be executed as a normal command,
- # and the command is the name of a directory, perform the cd command to that directory
- setopt correct # try to correct the spelling if possible
- setopt extended_glob # in order to use #, ~ and ^ for filename generation
- # grep word *~(*.gz|*.bz|*.bz2|*.zip|*.Z) ->
- # -> searches for word not in compressed files
- # don't forget to quote '^', '~' and '#'!
- setopt NO_clobber # warning if file exists ('cat /dev/null > ~/.zshrc')
- setopt notify # report the status of backgrounds jobs immediately
- setopt hash_list_all # Whenever a command completion is attempted, make sure \
- # the entire command path is hashed first.
- setopt completeinword # not just at the end
-# setopt nocheckjobs # don't warn me about bg processes when exiting
- setopt nohup # and don't kill them, either
-# setopt printexitvalue # alert me if something failed
-# setopt dvorak # with spelling correction, assume dvorak kb
-
- MAILCHECK=30 # mailchecks
- REPORTTIME=5 # report about cpu-/system-/user-time of command if running longer than 5 secondes
- watch=(notme root) # watch for everyone but me and root
-# }}}
-
-# {{{ history
- export ZSHDIR=$HOME/.zsh
- HISTFILE="$HOME/.zsh_history"
- HISTSIZE=500
- SAVEHIST=1000 # useful for setopt append_history
-# }}}
-
-# {{{ set prompt
- #precmd () { setopt promptsubst; [[ -o interactive ]] && jobs -l;
- is4 && precmd () {
- RPROMPT="%(?..:()% ${SCREENTITLE}"
- }
-
- is4 && preexec () {
- # set screen window title if running in a screen
- # get the name of the program currently running
- if [[ "$TERM" == screen* ]]; then
- local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]}
- echo -ne "\ek$CMD\e\\"
- fi
- # set the screen title to "zsh" when sitting at a command prompt:
- if [[ "$TERM" == screen* ]]; then
- SCREENTITLE=$'%{\ekzsh\e\\%}'
- else
- SCREENTITLE=''
- fi
- }
-
- EXITCODE="%(?..%?%1v )"
- local BLUE="%{\e[1;34m%}"
- local RED="%{\e[1;31m%}"
- local GREEN="%{\e[1;32m%}"
- local CYAN="%{\e[1;36m%}"
- local NO_COLOUR="%{\e[0m%}"
- PS2='`%_> ' # secondary prompt, printed when the shell needs more information to complete a command.
- PS3='?# ' # selection prompt used within a select loop.
- PS4='+%N:%i:%_> ' # the execution trace prompt (setopt xtrace). default: '+%N:%i>'
-
-# only if $GRMLPROMPT is set (e.g. via GRMLPROMPT='1') use the extended prompt
- if ! [[ -z "$GRMLPROMPT" ]]; then
- PROMPT="${RED}${EXITCODE}${CYAN}[%j running job(s)] ${GREEN}{history#%!} ${RED}%(3L.+.) ${BLUE}%* %D
-${BLUE}%n${NO_COLOUR}@%m %40<...<%B%~%b%<< %# "
- else
- if (( EUID != 0 )); then
- PROMPT="${RED}${EXITCODE}${BLUE}%n${NO_COLOUR}@%m %40<...<%B%~%b%<< %# " # primary prompt string
- else
- PROMPT="${BLUE}${EXITCODE}${RED}%n${NO_COLOUR}@%m %40<...<%B%~%b%<< %# " # primary prompt string
- fi
- fi
-# }}}
-
-# {{{ 'hash' some often used directories
- hash -d deb=/var/cache/apt/archives
- hash -d doc=/usr/share/doc
- hash -d linux=/lib/modules/$(command uname -r)/build/
- hash -d log=/var/log
- hash -d slog=/var/log/syslog
- hash -d src=/usr/src
- hash -d templ=/usr/share/doc/grml-templates
- hash -d tt=/usr/share/doc/texttools-doc
- hash -d www=/var/www
-# }}}
-
-# {{{ some aliases
- alias la="ls -la --color=auto"
- alias ll="ls -l --color=auto"
- alias l="ls -lF --color=auto"
- alias ls="ls --color=auto" # people are used to it, so...
-
- alias cp='nocorrect cp' # no spelling correction on cp
- alias mkdir='nocorrect mkdir' # no spelling correction on mkdir
- alias mv='nocorrect mv' # no spelling correction on mv
-
-# debian stuff
- alias acs='apt-cache search'
- alias agi='apt-get install'
- alias acsh='apt-cache show'
- alias au='apt-get update'
- alias ag='apt-get upgrade'
- alias adg='apt-get dist-upgrade'
- alias ge='grep-excuses'
- alias dbp='dpkg-buildpackage'
-
- isgrmlcd && alias su='sudo su' # change to user root
- alias tlog='tail -f /var/log/syslog' # take a look at the syslog
- alias zshskel='source /etc/skel/.zshrc' # source skeleton zshrc
-# }}}
-
-# {{{ Use hard limits, except for a smaller stack and no core dumps
- unlimit
- limit stack 8192
- limit core 0 # important for a live-cd-system
- limit -s
-# }}}
-
-# {{{ completion stuff
-# called later (via is4 && grmlcomp)
-# use 'zstyle' for getting current settings
-# press ^Xh (control-x h) for getting tags in context
-grmlcomp() {
- zstyle ':completion:*:processes' command 'ps -au$USER' # on processes completion complete all user processes
- zstyle ':completion:*:descriptions' format \
- $'%{\e[0;31m%}completing %B%d%b%{\e[0m%}' # format on completion
- zstyle ':completion:*' verbose yes # provide verbose completion information
- zstyle ':completion:*:messages' format '%d'
- zstyle ':completion:*:warnings' format \
- $'%{\e[0;31m%}No matches for:%{\e[0m%} %d'
- zstyle ':completion:*:matches' group 'yes' # separate matches into groups
- zstyle ':completion:*:options' description 'yes' # describe options in full
- zstyle ':completion:*:options' auto-description '%d'
- zstyle ':completion:*:*:zcompile:*' ignored-patterns '(*~|*.zwc)'
-
-# activate color-completion(!)
- zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
-
-## correction
-
-# Ignore completion functions for commands you don't have:
-# zstyle ':completion:*:functions' ignored-patterns '_*'
- zstyle ':completion::(^approximate*):*:functions' ignored-patterns '_*'
-
- zstyle ':completion:*' completer _complete _correct _approximate
- zstyle ':completion:*:correct:*' insert-unambiguous true
-# zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'
-# zstyle ':completion:*:corrections' format $'%{\e[0;31m%}%d (errors: %e)%}'
- zstyle ':completion:*:corrections' format $'%{\e[0;31m%}%d (errors: %e)%{\e[0m%}'
- zstyle ':completion:*:correct:*' original true
- zstyle ':completion:correct:' prompt 'correct to:'
-
-# allow one error for every three characters typed in approximate completer
- zstyle -e ':completion:*:approximate:' max-errors 'reply=( $((($#PREFIX+$#SUFFIX)/3 )) numeric )'
-# zstyle ':completion:*:correct:*' max-errors 2 numeric
-
-# match uppercase from lowercase
- zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
-
-# command for process lists, the local web server details and host completion
- hosts=(`hostname` grml.org)
- zstyle '*' hosts $hosts
- zstyle ':completion:*:urls' local 'www' '/var/www/' 'public_html'
-
-# offer indexes before parameters in subscripts
- zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
-
-# insert all expansions for expand completer
- zstyle ':completion:*:expand:*' tag-order all-expansions
-
-# ignore duplicate entries
- zstyle ':completion:*:history-words' stop yes
- zstyle ':completion:*:history-words' remove-all-dups yes
- zstyle ':completion:*:history-words' list false
- zstyle ':completion:*:history-words' menu yes
-
-# filename suffixes to ignore during completion (except after rm command)
-# zstyle ':completion:*:*:(^rm):*:*files' ignored-patterns '*?.(o|c~|old|pro|zwc)' '*~'
-
-# Don't complete backup files as executables
- zstyle ':completion:*:complete:-command-::commands' ignored-patterns '*\~'
-
-# If there are more than 5 options, allow selecting from a menu with
-# arrows (case insensitive completion!).
-# zstyle ':completion:*-case' menu select=5
- zstyle ':completion:*' menu select=5
-
-# zstyle ':completion:*:*:kill:*' verbose no
-# zstyle ':completion:*:sudo:*' command-path /usr/local/sbin /usr/local/bin \
-# /usr/sbin /usr/bin /sbin /bin /usr/X11R6/bin
-
-# caching
- [ -d $ZSHDIR/cache ] && zstyle ':completion:*' use-cache yes && \
- zstyle ':completion::complete:*' cache-path $ZSHDIR/cache/
-
-# use ~/.ssh/known_hosts for completion
-# local _myhosts
-# _myhosts=( ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*} )
-# zstyle ':completion:*' hosts $_myhosts
- [ -f "$HOME/.ssh/known_hosts" ] && \
- hosts=(${${${(f)"$(<$HOME/.ssh/known_hosts)"}%%\ *}%%,*}) && \
- zstyle ':completion:*:hosts' hosts $hosts
-
-# simple completion for fbset (switch resolution on console)
- _fbmodes() { compadd 640x480-60 640x480-72 640x480-75 640x480-90 640x480-100 768x576-75 800x600-48-lace 800x600-56 800x600-60 800x600-70 800x600-72 800x600-75 800x600-90 800x600-100 1024x768-43-lace 1024x768-60 1024x768-70 1024x768-72 1024x768-75 1024x768-90 1024x768-100 1152x864-43-lace 1152x864-47-lace 1152x864-60 1152x864-70 1152x864-75 1152x864-80 1280x960-75-8 1280x960-75 1280x960-75-32 1280x1024-43-lace 1280x1024-47-lace 1280x1024-60 1280x1024-70 1280x1024-74 1280x1024-75 1600x1200-60 1600x1200-66 1600x1200-76 }
- compdef _fbmodes fbset
-
-# use generic completion system for programs not yet defined:
- compdef _gnu_generic tail head feh cp mv gpg df stow uname ipacsum fetchipac
-
-# Debian specific stuff
-# zstyle ':completion:*:*:lintian:*' file-patterns '*.deb'
- zstyle ':completion:*:*:linda:*' file-patterns '*.deb'
-
- _debian_rules() { words=(make -f debian/rules) _make }
- compdef _debian_rules debian/rules # type debian/rules <TAB> inside a source package
-
-# see upgrade function in this file
- compdef _hosts upgrade
-}
-# }}}
-
-# {{{ grmlstuff
-grmlstuff() {
-# people should use 'grml-x'!
- if ! [ -r /etc/X11/xorg.conf ] ; then
- isgrmlcd && alias startx='echo -e "Please use the script \"grml-x\" for starting the X Window System.\n If you want to use startx anyway please call \"/usr/X11R6/bin/startx\"."; return -1'
- fi
-
-# load language settings - wrapper around the main script
- grml-lang(){
- grml-setlang $* && zsh
- }
-
- _grml-lang() { compadd at de en ; }
- compdef _grml-lang grml-lang
-
-# _grml-x() { compadd fluxbox ion2 ion3 pekwm ratpoison twm wmi wmii ; }
-# compdef _grml-x grml-x
- _grml-x() { local arguments wm
- wm=(fluxbox ion2 ion3 pekwm pwm2 pwm3 ratpoison twm wmi wmii)
- arguments=(
- '-display:display for xserver:(7 8)'
- '-force[force creation of xconfig file]' '-help:display help'
- '-hsync:horizontal sync frequencies (<number>):(28 `seq 30 5 95` 96)'
- '-mode:resolution-mode for xserver (<width>x<height> - e.g. 1024x768)]:(1920x1440 1600x1200 1400x1050 1280x102
-4 1280x960 1024x768 800x600 640x480)'
- '-module:module for xserver :(`cd /usr/X11R6/lib/modules/drivers && ls *.o | sed 's/_drv.o//'`)'
- '-nostart:do not start X server'
- '-vsync:vertical sync frequencies (<number>):(43 `seq 45 5 70` 72)'
- '-xserver:xserver used for creation of xconfig file:(XFree86 X.org)'
- ':window manager:($wm)'
- )
- #'-vsync:use specified vsync (xx.0 - xx.0):(`seq -f '%g.0' 50 5 70`)'
- #'-hsync:use specified hsync (xx.0 - xx.0):(28.0 `seq -f '%g.0' 30 5 95` 96.0)'
- _arguments -s $arguments
- }
- compdef _grml-x grml-x
-
- grml-wallpaper() { Esetroot -scale /usr/share/grml/$* }
- _grml-wallpaper() {
- dirs=(. /usr/share/grml/)
- _description files expl 'set desktop wallpaper on grml system'
- _files "$expl[@]" -W dirs -g '*.{jpg,png}(-.)'
- }
- compdef _grml-wallpaper grml-wallpaper
-
- alias grml-version='cat /etc/grml_version'
-}
-# }}}
-
-# {{{ now run the functions
- isgrml && checkhome
- is4 && isgrml && grmlstuff
- is4 && grmlcomp
-# }}}
-
-# {{{ keephack
- [ -r /etc/zsh/keephack ] && is4 && source /etc/zsh/keephack
-# }}}
-
-# {{{ wonderful idea of using "e" glob qualifier by Peter Stephenson
-# You use it as follows:
-# $ NTREF=/reference/file
-# $ ls -l *(e:nt:)
-# This lists all the files in the current directory newer than the reference file.
-# You can also specify the reference file inline; note quotes:
-# $ ls -l *(e:'nt ~/.zshenv':)
- is4 && nt() {
- if [[ -n $1 ]]; then
- local NTREF=${~1}
- fi
- [[ $REPLY -nt $NTREF ]]
- }
-# }}}
-
-# shell functions {{{
- setenv() { typeset -x "${1}${1:+=}${(@)argv[2,$#]}" } # csh compatibility
- freload() { while (( $# )); do; unfunction $1; autoload -U $1; shift; done }
- manzsh() { man zshall | $MYLESS -p $1 ; }
-
-# use it e.g. via 'restart apache2'
-# for i in start restart stop reload ;
-# do
-# eval "$i() { /etc/init.d/\$1 $i ; }"
-# done
- for i in Start Restart Stop Reload ; do
- if [ UID != 0 ] ; then
- RUNASROOT=sudo
- fi
- eval "$i() { $RUNASROOT /etc/init.d/\$1 ${i:l} ; }"
- done
-# now the completion for this:
-# compdef "_files -W /etc/init.d/" Stop Start Reload Restart
- compctl -g "$(echo /etc/init.d/*(:t))" Start Restart Stop Reload
-# }}}
-
-# source another config file if present {{{
- if [ -r /etc/zsh/zshrc.local ]; then
- source /etc/zsh/zshrc.local
- fi
-# }}}
-
-## END OF FILE #################################################################
-# vim:foldmethod=marker
+++ /dev/null
-## $Id: .zshrc,v1.07 for zsh4.x
-## Thursday May 23 22:36:11 CEST 2002
-## Created by Marijan Peh <marijan.peh@hi.hinet.hr>
-## Latest version on http://free-po.hinet.hr/MarijanPeh/files/zshrc
-##
-## With sugestions from:
-## Bart Schaefer <schaefer@brasslantern.com>
-## Mario Jose Medjeral <mario@medjeral.demon.co.uk>
-##
-## This file is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-##
-## Use and modify to personal taste. Copying this file without
-## thought will needlessly increase zsh's memory usage and startup time.
-
-## others can't rwx my files
-## this is very paranoid :-) set to 022 if you wish
-umask 077
-
-## get keys working
-case $TERM in
- linux)
- bindkey "^[[2~" yank
- bindkey "^[[3~" delete-char
- bindkey "^[[5~" up-line-or-history ## PageUp
- bindkey "^[[6~" down-line-or-history ## PageDown
- bindkey "^[[1~" beginning-of-line
- bindkey "^[[4~" end-of-line
- bindkey "^[e" expand-cmd-path ## C-e for expanding path of typed command
- bindkey "^[[A" up-line-or-search ## up arrow for back-history-search
- bindkey "^[[B" down-line-or-search ## down arrow for fwd-history-search
- bindkey " " magic-space ## do history expansion on space
-;;
- *xterm*|rxvt|(dt|k|E)term)
- bindkey "^[[2~" yank
- bindkey "^[[3~" delete-char
- bindkey "^[[5~" up-line-or-history ## PageUp
- bindkey "^[[6~" down-line-or-history ## PageDown
- bindkey "^[[7~" beginning-of-line
- bindkey "^[[8~" end-of-line
- bindkey "^[e" expand-cmd-path ## C-e for expanding path of typed command
- bindkey "^[[A" up-line-or-search ## up arrow for back-history-search
- bindkey "^[[B" down-line-or-search ## down arrow for fwd-history-search
- bindkey " " magic-space ## do history expansion on space
-;;
-esac
-
-## use hard limits, except for a smaller stack and no core dumps
-unlimit
-limit stack 8192
-limit core 0
-limit -s
-
-## set path and cdpath
-## think about setting path,cdpath,manpath & fpath in .zshenv
-path=($path /bin /usr/bin /usr/X11R6/bin)
-path=($path /usr/local/bin $HOME/bin)
-cdpath=(~ ..) ## on cd command offer dirs in home and one dir up.
-
-## for root add sbin dirs to path
-if (( EUID == 0 )); then
- path=($path /sbin /usr/sbin /usr/local/sbin)
-fi
-
-## aditional dir to look for function definitions
-fpath=($fpath ~/.zfunc) ## EDIT ## or comment if u don't need it.
-
-## set manpath
-manpath=(/usr/local/man /usr/share/man) ## EDIT ##
-manpath=($manpath /usr/X11R6/man /usr/man /usr/lib/perl5/man) ## EDIT ##
-
-## remove duplicate entries from path,cdpath,manpath & fpath
-typeset -U path cdpath manpath fpath
-
-## The file to save the history in when an interactive shell exits.
-## If unset, the history is not saved.
-HISTFILE=${HOME}/.zsh_history
-
-## The maximum number of events stored in the internal history list.
-HISTSIZE=1000
-
-## The maximum number of history events to save in the history file.
-SAVEHIST=1000
-
-## maximum size of the directory stack.
-DIRSTACKSIZE=20
-
-## file for mail checking
-MAIL=/var/mail/$USERNAME
-
-## The interval in seconds between checks for new mail.
-MAILCHECK=60
-
-## The interval in seconds between checks for login/logout activity
-## using the watch parameter.
-LOGCHECK=60
-
-## The baud rate of the current connection. Used by the line editor
-## update mechanism to compensate for a slow terminal by delaying
-## updates until necessary.
-#BAUD=38400 ## to turn off set this to zero
-
-## If nonnegative, commands whose combined user and system execution times
-## (measured in seconds) are greater than this value have timing
-## statistics printed for them.
-#REPORTTIME=1
-
-## If set, this gives a string of characters, which can use
-## all the same codes as the bindkey command as described in
-## section The zsh/zle Module, that will be output to
-## the terminal instead of beeping.
-## This may have a visible instead of an audible effect;
-## for example, the string `\e[?5h\e[?5l' on a vt100 or xterm will have
-## the effect of flashing reverse video on and off (if you usually use reverse
-## video, you should use the string `\e[?5l\e[?5h' instead). This takes
-## precedence over the NOBEEP option.
-#ZBEEP='\e[?5h\e[?5l'
-
-## The directory to search for shell startup files (.zshrc, etc),
-## if not $HOME.
-#ZDOTDIR=~/.zsh
-
-
-
-## (( ${+*} )) = if variable is set don't set it anymore
-(( ${+USER} )) || export USER=$USERNAME
-(( ${+HOSTNAME} )) || export HOSTNAME=$HOST
-(( ${+EDITOR} )) || export EDITOR=`which vim`
-(( ${+VISUAL} )) || export VISUAL=`which vim`
-(( ${+FCEDIT} )) || export FCEDIT=`which vim`
-(( ${+PAGER} )) || export PAGER=`which less`
-(( ${+MAILCALL} )) || export MAILCALL='*** NEW MAIL ***' ## new mail warning
-(( ${+LESSCHARSET} )) || export LESSCHARSET='latin1' ## charset for pager
-(( ${+LESSOPEN} )) || export LESSOPEN='|lesspipe.sh %s'
-(( ${+MOZILLA_HOME} )) || export MOZILLA_HOME='/usr/lib/netscape' ## EDIT ##
-(( ${+MOZILLA_NO_ASYNC_DNS} )) || export MOZILLA_NO_ASYNC_DNS='True'
-(( ${+NNTPSERVER} )) || export NNTPSERVER='' ## news server ## EDIT ##
-(( ${+CC} )) || export CC='gcc' ## or egcs or whatever
-
-## compiler opt. flags !!! use this with caution !!! or dont use et all
-case $CPUTYPE in
- i686)
- (( ${+CFLAGS} )) || export CFLAGS='-O9 -funroll-loops -ffast-math -malign-double -mcpu=pentiumpro -march=pentiumpro -fomit-frame-pointer -fno-exceptions'
-;;
- i586)
- (( ${+CFLAGS} )) || export CFLAGS='-O3 -march=pentium -mcpu=pentium -ffast-math -funroll-loops -fomit-frame-pointer -fforce-mem -fforce-addr -malign-double -fno-exceptions'
-;;
- i486)
- (( ${+CFLAGS} )) || export CFLAGS='-O3 -funroll-all-loops -malign-double -mcpu=i486 -march=i486 -fomit-frame-pointer -fno-exceptions'
-;;
- *)
- (( ${+CXXFLAGS} )) || export CXXFLAGS=$CFLAGS
-esac
-
-## variables for BitchX (irc client)
-(( ${+IRCNAME} )) || export IRCNAME='' ## EDIT ##
-(( ${+IRCNICK} )) || export IRCNICK='' ## EDIT ##
-(( ${+IRCSERVER} )) || export IRCSERVER='' ## EDIT ##
-
-## auto logout after timeout in seconds
-TMOUT=1800
-
-## if we are in X then disable TMOUT
-case $TERM in
- *xterm*|rxvt|(dt|k|E)term)
- unset TMOUT
- ;;
-esac
-
-#bindkey -v ## vi key bindings
-bindkey -e ## emacs key bindings
-
-## turn on full featured completion (minimal needs: zsh3.1)
-if [[ "$ZSH_VERSION" == (3.1|4)* ]]; then
- autoload -U compinit
- compinit -C
-else
- print "Advanced completion system not found; ignoring zstyle settings."
- function zstyle { }
-fi
-
-## set colors for GNU ls ; set this to right file
-eval `dircolors /etc/DIR_COLORS` ## EDIT ##
-
-## Color completion
-## this module should be automatically loaded if u use menu selection
-## but to be sure we do it here
-zmodload -i zsh/complist
-
-## Someone once accused zsh of not being as complete as Emacs, because it
-## lacks Tetris and an adventure game.
-autoload -U tetris
-zle -N tetris
-bindkey "^Xt" tetris ## C-x-t to play
-
-## This allows incremental completion of a word.
-## After starting this command, a list of completion
-## choices can be shown after every character you
-## type, which you can delete with ^h or DEL.
-## RET will accept the completion so far.
-## You can hit TAB to do normal completion, ^g to
-## abort back to the state when you started, and ^d to list the matches.
-autoload -U incremental-complete-word
-zle -N incremental-complete-word
-bindkey "^Xi" incremental-complete-word ## C-x-i
-
-## This function allows you type a file pattern,
-## and see the results of the expansion at each step.
-## When you hit return, they will be inserted into the command line.
-autoload -U insert-files
-zle -N insert-files
-bindkey "^Xf" insert-files ## C-x-f
-
-## This set of functions implements a sort of magic history searching.
-## After predict-on, typing characters causes the editor to look backward
-## in the history for the first line beginning with what you have typed so
-## far. After predict-off, editing returns to normal for the line found.
-## In fact, you often don't even need to use predict-off, because if the
-## line doesn't match something in the history, adding a key performs
-## standard completion - though editing in the middle is liable to delete
-## the rest of the line.
-autoload -U predict-on
-zle -N predict-on
-zle -N predict-off
-bindkey "^X^Z" predict-on ## C-x C-z
-bindkey "^Z" predict-off ## C-z
-
-## This is a multiple move based on zsh pattern matching. To get the full
-## power of it, you need a postgraduate degree in zsh.
-## Read /path_to_zsh_functions/zmv for some basic examples.
-#autoload -U zmv
-
-## watch for my friends
-## An array (colon-separated list) of login/logout events to report.
-## If it contains the single word `all', then all login/logout events
-## are reported. If it contains the single word `notme', then all
-## events are reported as with `all' except $USERNAME.
-## An entry in this list may consist of a username,
-## an `@' followed by a remote hostname,
-## and a `%' followed by a line (tty).
-#watch=( $(<~/.friends) ) ## watch for people in $HOME/.friends file
-watch=(notme) ## watch for everybody but me
-LOGCHECK=60 ## check every ... seconds for login/logout activity
-
-## The format of login/logout reports if the watch parameter is set.
-## Default is `%n has %a %l from %m'.
-## Recognizes the following escape sequences:
-## %n = name of the user that logged in/out.
-## %a = observed action, i.e. "logged on" or "logged off".
-## %l = line (tty) the user is logged in on.
-## %M = full hostname of the remote host.
-## %m = hostname up to the first `.'.
-## %t or %@ = time, in 12-hour, am/pm format.
-## %w = date in `day-dd' format.
-## %W = date in `mm/dd/yy' format.
-## %D = date in `yy-mm-dd' format.
-WATCHFMT='%n %a %l from %m at %t.'
-
-## set prompts ####
-## choose just one
-#PS1=$'%{\e[0;36m%}%n%{\e[0m%}:%{\e[0;31m%}%3~%{\e[0m%}%# ' ## user:~%
-#PS1=$'%{\e[0;36m%}%n%{\e[0m%}:%{\e[0;31m%}%3~%{\e[0m%}%B>%b ' ## user:~>
-#PS1='%n@%m:%4c%1v> ';RPS1=$'%{\e[0;36m%}%D{%A %T}%{\e[0m%}' ## user@host:~> ; Day time(hh:mm:ss)
-#PS1='%B[%b%n%B:%b%~%B]%b$ ' ## [user:~]$
-#PS1=$'%{\e[0;36m%}%n%{\e[0m%}:%20<..<%~%B>%b ' ## user:..c/vim-common-6.0>
-#PS1=$'%{\e[0;36m%}%#%{\e[0m%} ';RPS1=$'%{\e[0;31m%}%~%{\e[0m%}' ## % ; ~
-#PS1=$'%{\e[0;36m%}%n%{\e[0m%}%{\e[0;31m%}%#%{\e[0m%} ';RPS1=$'%{\e[0;31m%}%~%{\e[0m%}' ## user% ; ~
-#PS1='%# ';RPS1='%B%~%b' ## % ; ~ : no colors
-#PS1='%n@%m:%B%~%b> ' ## user@host:~> : no colors
-
-## or use neat prompt themes included with zsh
-autoload -U promptinit
-promptinit
-## Currently available prompt themes:
-## adam1 adam2 bart bigfade clint elite2 elite
-## fade fire off oliver redhat suse walters zefram
-prompt elite2
-
-## don't ask me 'do you wish to see all XX possibilities' before menu selection
-LISTPROMPT=''
-
-## SPROMPT - the spelling prompt
-SPROMPT='zsh: correct '%R' to '%r' ? ([Y]es/[N]o/[E]dit/[A]bort) '
-
-## functions for displaying neat stuff in *term title
-case $TERM in
- *xterm*|rxvt|(dt|k|E)term)
- ## display user@host and full dir in *term title
- precmd () {
- print -Pn "\033]0;%n@%m %~\007"
- #print -Pn "\033]0;%n@%m%# %~ %l %w :: %T\a" ## or use this
- }
- ## display user@host and name of current process in *term title
- preexec () {
- print -Pn "\033]0;%n@%m <$1> %~\007"
- #print -Pn "\033]0;%n@%m%# <$1> %~ %l %w :: %T\a" ## or use this
- }
- ;;
-esac
-
-## aliases ####
-alias p='ps -fu $USER'
-alias v='less'
-alias h='history'
-alias z='vim ~/.zshrc;src'
-alias gvim='gvim -U ~/.gvimrc'
-alias g='gvim'
-alias vi='vim'
-alias mv='nocorrect mv -i'
-alias cp='nocorrect cp -i'
-alias rm='nocorrect rm -i'
-alias mkdir='nocorrect mkdir'
-alias man='nocorrect man'
-alias find='noglob find'
-alias ls='ls --color=auto'
-alias l='ls'
-alias ll='ls -l'
-alias l.='ls -A'
-alias ll.='ls -al'
-alias lsa='ls -ls .*' ## list only file beginning with "."
-alias lsd='ls -ld *(-/DN)' ## list only dirs
-alias du1='du -hs *(/)' ## du with depth 1
-alias u='uptime'
-alias j='ps ax'
-alias ..='cd ..'
-alias cd..='cd ../..'
-alias cd....='cd ../../..'
-alias cd.....='cd ../../../..'
-alias cd/='cd /'
-alias sd='export DISPLAY=:0.0' ## export DISPLAY=:0.0
-alias x='startx &! exit'
-alias x8='startx -- -bpp 8 &! exit'
-alias x16='startx -- -bpp 16 &! exit'
-alias x24='startx -- -bpp 24 &! exit'
-alias x32='startx -- -bpp 32 &! exit'
-alias dpms='sleep 2 ; clear ; xset dpms force off'
-## global aliases, this is not good but it's useful
-alias -g L='|less'
-alias -g G='|grep'
-alias -g T='|tail'
-alias -g H='|head'
-alias -g W='|wc -l'
-alias -g S='|sort'
-alias -g US='|sort -u'
-alias -g NS='|sort -n'
-alias -g RNS='|sort -nr'
-alias -g N='&>/dev/null&'
-
-## changing terminal type
-alias v1='export TERM=vt100'
-alias v2='export TERM=vt220'
-alias vx='export TERM=xterm-color'
-
-## functions ####
-## csh compatibility
-setenv () { typeset -x "${1}${1:+=}${(@)argv[2,$#]}" }
-
-## find process to kill and kill it.
-pskill ()
-{
- local pid
- pid=$(ps -ax | grep $1 | grep -v grep | awk '{ print $1 }')
- echo -n "killing $1 (process $pid)..."
- kill -9 $=pid
- echo "slaughtered."
-}
-
-## invoke this every time when u change .zshrc to
-## recompile it.
-src ()
-{
- autoload -U zrecompile
- [ -f ~/.zshrc ] && zrecompile -p ~/.zshrc
- [ -f ~/.zcompdump ] && zrecompile -p ~/.zcompdump
- [ -f ~/.zshrc.zwc.old ] && rm -f ~/.zshrc.zwc.old
- [ -f ~/.zcompdump.zwc.old ] && rm -f ~/.zcompdump.zwc.old
- source ~/.zshrc
-}
-
-## make screenshot of current desktop (use import from ImageMagic)
-sshot ()
-{ sleep 5; import -window root desktop.jpg }
-
-## find all suid files
-suidfind ()
-{ ls -l /**/*(su0x) }
-
-## restore all .bak files
-restore_bak ()
-{
-autoload -U zmv
-zmv '(**/)(*).bak' '$1$2'
-}
-
-## display processes tree in less
-pst ()
-{ pstree -p $* | less -S }
-
-## search for various types or README file in dir and display them in $PAGER
-readme ()
-{
- local files
- files=(./(#i)*(read*me|lue*m(in|)ut)*(ND))
- if (($#files))
- then $PAGER $files
- else
- print 'No README files.'
- fi
-}
-
-## completions ####
-## General completion technique
-## complete as much u can ..
-zstyle ':completion:*' completer _complete _list _oldlist _expand _ignored _match _correct _approximate _prefix
-## complete less
-#zstyle ':completion:*' completer _expand _complete _list _ignored _approximate
-## complete minimal
-#zstyle ':completion:*' completer _complete _ignored
-
-## allow one error
-#zstyle ':completion:*:approximate:*' max-errors 1 numeric
-## allow one error for every three characters typed in approximate completer
-zstyle -e ':completion:*:approximate:*' max-errors \
- 'reply=( $(( ($#PREFIX+$#SUFFIX)/3 )) numeric )'
-
-## formatting and messages
-zstyle ':completion:*' verbose yes
-zstyle ':completion:*:descriptions' format $'%{\e[0;31m%}%d%{\e[0m%}'
-zstyle ':completion:*:messages' format $'%{\e[0;31m%}%d%{\e[0m%}'
-zstyle ':completion:*:warnings' format $'%{\e[0;31m%}No matches for: %d%{\e[0m%}'
-zstyle ':completion:*:corrections' format $'%{\e[0;31m%}%d (errors: %e)%{\e[0m%}'
-zstyle ':completion:*' group-name ''
-
-## determine in which order the names (files) should be
-## listed and completed when using menu completion.
-## `size' to sort them by the size of the file
-## `links' to sort them by the number of links to the file
-## `modification' or `time' or `date' to sort them by the last modification time
-## `access' to sort them by the last access time
-## `inode' or `change' to sort them by the last inode change time
-## `reverse' to sort in decreasing order
-## If the style is set to any other value, or is unset, files will be
-## sorted alphabetically by name.
-zstyle ':completion:*' file-sort name
-
-## how many completions switch on menu selection
-## use 'long' to start menu compl. if list is bigger than screen
-## or some number to start menu compl. if list has that number
-## of completions (or more).
-zstyle ':completion:*' menu select=long
-
-## case-insensitive (uppercase from lowercase) completion
-zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
-## case-insensitive (all) completion
-#zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
-## case-insensitive,partial-word and then substring completion
-#zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
-
-## offer indexes before parameters in subscripts
-zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
-
-## insert all expansions for expand completer
-zstyle ':completion:*:expand:*' tag-order all-expansions
-
-## ignore completion functions (until the _ignored completer)
-zstyle ':completion:*:functions' ignored-patterns '_*'
-
-## completion caching
-zstyle ':completion::complete:*' use-cache 1
-zstyle ':completion::complete:*' cache-path ~/.zcompcache/$HOST
-
-## add colors to completions
-zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
-
-## don't complete backup files as executables
-zstyle ':completion:*:complete:-command-::commands' ignored-patterns '*\~'
-
-## filename suffixes to ignore during completion (except after rm command)
-zstyle ':completion:*:*:(^rm):*:*files' ignored-patterns \
-'*?.(o|c~|old|pro|zwc)' '*~'
-
-## completions for some progs. not in default completion system
-
-zstyle ':completion:*:*:mpg123:*' file-patterns \
-'*.(mp3|MP3):mp3\ files *(-/):directories'
-
-zstyle ':completion:*:*:ogg123:*' file-patterns \
-'*.(ogg|OGG):ogg\ files *(-/):directories'
-
-## generic completions for programs which understand GNU long options(--help)
-
-compdef _gnu_generic slrnpull make df du
-
-## on processes completion complete all user processes
-zstyle ':completion:*:processes' command 'ps -au$USER'
-
-## add colors to processes for kill completion
-zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
-
-## common usernames
-#users=(jozo tomi peh) ## complete usernames
-## if u have too much users to write in here, use file; change
-## 'users=(jozo tomi peh)' to 'users=( $(<~/.somefile) )'
-#zstyle ':completion:*' users $users
-
-## common hostnames
-#hosts=( $(</etc/hosts) )
-#zstyle ':completion:*' hosts $hosts
-
-## (user,host) pairs
-## all my accounts:
-#my_accounts=(
-# {joe,root}@mymachine.com
-# jbloggs@myothermachine.com
-#)
-
-## other people's accounts:
-#other_accounts=(
-# {fred,root}@hismachine.com
-# vera@hermachine.com
-#)
-#zstyle ':completion:*:my-accounts' users-hosts $my_accounts
-#zstyle ':completion:*:other-accounts' users-hosts $other_accounts
-
-## (host, port, user) triples for telnet
-#telnet_users_hosts_ports=(
-# user1@host1:
-# user2@host2:
-# @mail-server:{smtp,pop3}
-# @news-server:nntp
-# @proxy-server:8000
-#)
-#zstyle ':completion:*:*:telnet:*' users-hosts-ports $telnet_users_hosts_ports
-
-## set options (setopt) ####
-############################
-# In the following list, options set by default in all emulations are marked
-# <D>; those set by default only in csh, ksh, sh, or zsh emulations are marked
-# <C>, <K>, <S>, <Z> as appropriate. When listing options
-# (by `setopt', `unsetopt', `set -o' or `set +o'), those turned on by default
-# appear in the list prefixed with `no'. Hence (unless KSH_OPTION_PRINT is set),
-# `setopt' shows all options whose settings
-# are changed from the default.
-# Default options are commented, uncomment them if you want
-# to be diferent from default
-
-# ALIASES <D> Expand aliases.
-#setopt NO_aliases
-
-# ALL_EXPORT (-a, ksh: -a)
-# All parameters subsequently defined are automatically exported.
-#setopt all_export
-
-# ALWAYS_LAST_PROMPT <D>
-# If unset, key functions that list completions try to return to the last
-# prompt if given a numeric argument. If set these functions try to
-# return to the last prompt if given no numeric argument.
-#setopt NO_always_last_prompt
-
-# ALWAYS_TO_END
-# If a completion is performed with the cursor within a word, and a
-# full completion is inserted, the cursor is moved to the end of the
-# word. That is, the cursor is moved to the end of the word if either
-# a single match is inserted or menu completion is performed.
-setopt always_to_end
-
-# APPEND_HISTORY <D>
-# If this is set, zsh sessions will append their history list to
-# the history file, rather than overwrite it. Thus, multiple parallel
-# zsh sessions will all have their history lists added to the
-# history file, in the order they are killed.
-#setopt NO_append_history
-
-# AUTO_CD (-J)
-# If a command is issued that can't be executed as a normal command,
-# and the command is the name of a directory, perform the cd
-# command to that directory.
-setopt auto_cd
-
-# AUTO_LIST (-9) <D>
-# Automatically list choices on an ambiguous completion.
-#setopt NO_auto_list
-
-# AUTO_MENU <D>
-# Automatically use menu completion after the second consecutive request for
-# completion, for example by pressing the tab key repeatedly. This option
-# is overridden by MENU_COMPLETE.
-#setopt NO_auto_menu
-
-# AUTO_NAME_DIRS
-# Any parameter that is set to the absolute name of a directory
-# immediately becomes a name for that directory, that will be used
-# by the `%~'
-# and related prompt sequences, and will be available when completion
-# is performed on a word starting with `~'.
-# (Otherwise, the parameter must be used in the form `~param' first.)
-setopt NO_auto_name_dirs
-
-# AUTO_PARAM_KEYS <D>
-# If a parameter name was completed and a following character
-# (normally a space) automatically inserted, and the next character typed is one
-# of those that have to come directly after the name (like `}', `:',
-# etc.), the automatically added character is deleted, so that the character
-# typed comes immediately after the parameter name.
-# Completion in a brace expansion is affected similarly: the added character
-# is a `,', which will be removed if `}' is typed next.
-#setopt NO_auto_param_keys
-
-# AUTO_PARAM_SLASH <D>
-# If a parameter is completed whose content is the name of a directory,
-# then add a trailing slash instead of a space.
-#setopt NO_auto_param_slash
-
-# AUTO_PUSHD (-N)
-# Make cd push the old directory onto the directory stack.
-setopt auto_pushd
-
-# AUTO_REMOVE_SLASH <D>
-# When the last character resulting from a completion is a slash and the next
-# character typed is a word delimiter, a slash, or a character that ends
-# a command (such as a semicolon or an ampersand), remove the slash.
-#setopt NO_auto_remove_slash
-
-# AUTO_RESUME (-W)
-# Treat single word simple commands without redirection
-# as candidates for resumption of an existing job.
-setopt NO_auto_resume
-
-# BAD_PATTERN (+2) <C> <Z>
-# If a pattern for filename generation is badly formed, print an error message.
-# (If this option is unset, the pattern will be left unchanged.)
-#setopt NO_bad_pattern
-
-# BANG_HIST (+K) <C> <Z>
-# Perform textual history expansion, csh-style,
-# treating the character `!' specially.
-#setopt NO_bang_hist
-
-# BARE_GLOB_QUAL <Z>
-# In a glob pattern, treat a trailing set of parentheses as a qualifier
-# list, if it contains no `|', `(' or (if special) `~'
-# characters. See section Filename Generation.
-#setopt NO_bare_glob_qual
-
-# BASH_AUTO_LIST
-# On an ambiguous completion, automatically list choices when the
-# completion function is called twice in succession. This takes
-# precedence over AUTO_LIST. The setting of LIST_AMBIGUOUS is
-# respected. If AUTO_MENU is set, the menu behaviour will then start
-# with the third press. Note that this will not work with
-# MENU_COMPLETE, since repeated completion calls immediately cycle
-# through the list in that case.
-#setopt bash_auto_list
-
-# BEEP (+B) <D>
-# Beep on error in ZLE.
-setopt NO_beep
-
-# BG_NICE (-6) <C> <Z>
-# Run all background jobs at a lower priority. This option
-# is set by default.
-#setopt NO_bg_nice
-
-# BRACE_CCL
-# Expand expressions in braces which would not otherwise undergo brace
-# expansion to a lexically ordered list of all the characters. See
-# section Brace Expansion.
-setopt brace_ccl
-
-# BSD_ECHO <S>
-# Make the echo builtin compatible with the BSD man page echo(1) command.
-# This disables backslashed escape sequences in echo strings unless the
-# -e option is specified.
-#setopt bsd_echo
-
-# C_BASES
-# Output hexadecimal numbers in the standard C format, for example `0xFF'
-# instead of the usual `16#FF'. If the option OCTAL_ZEROES is also
-# set (it is not by default), octal numbers will be treated similarly and
-# hence appear as `077' instead of `8#77'. This option has no effect
-# on the choice of the output base, nor on the output of bases other than
-# hexadecimal and octal. Note that these formats will be understood on input
-# irrespective of the setting of C_BASES.
-setopt NO_c_bases
-
-# CDABLE_VARS (-T)
-# If the argument to a cd command (or an implied cd with the
-# AUTO_CD option set) is not a directory, and does not begin with a
-# slash, try to expand the expression as if it were preceded by a
-# `~' (see section Filename Expansion).
-setopt cdable_vars
-
-# CHASE_DOTS
-# When changing to a directory containing a path segment `..' which would
-# otherwise be treated as canceling the previous segment in the path (in
-# other words, `foo/..' would be removed from the path, or if `..' is
-# the first part of the path, the last part of $PWD would be deleted),
-# instead resolve the path to the physical directory. This option is
-# overridden by CHASE_LINKS.
-# For example, suppose /foo/bar is a link to the directory /alt/rod.
-# Without this option set, `cd /foo/bar/..' changes to /foo; with it
-# set, it changes to /alt. The same applies if the current directory
-# is /foo/bar and `cd ..' is used. Note that all other symbolic
-# links in the path will also be resolved.
-setopt NO_chase_dots
-
-
-# CHASE_LINKS (-w)
-# Resolve symbolic links to their true values when changing directory.
-# This also has the effect of CHASE_DOTS, i.e. a `..' path segment
-# will be treated as referring to the physical parent, even if the preceding
-# path segment is a symbolic link.
-setopt NO_chase_links
-
-# CHECK_JOBS <Z>
-# Report the status of background and suspended jobs before exiting a shell
-# with job control; a second attempt to exit the shell will succeed.
-# NO_CHECK_JOBS is best used only in combination with NO_HUP, else
-# such jobs will be killed automatically.
-#setopt NO_check_jobs
-
-# CLOBBER (+C, ksh: +C) <D>
-# Allows `>' redirection to truncate existing files,
-# and `>>' to create files.
-# Otherwise `>!' or `>|' must be used to truncate a file,
-# and `>>!' or `>>|' to create a file.
-#setopt clobber
-
-# COMPLETE_ALIASES
-# Prevents aliases on the command line from being internally substituted
-# before completion is attempted. The effect is to make the alias a
-# distinct command for completion purposes.
-setopt NO_complete_aliases
-
-# COMPLETE_IN_WORD
-# If unset, the cursor is set to the end of the word if completion is
-# started. Otherwise it stays there and completion is done from both ends.
-setopt complete_in_word
-
-# CORRECT (-0)
-# Try to correct the spelling of commands.
-setopt NO_correct
-
-# CORRECT_ALL (-O)
-# Try to correct the spelling of all arguments in a line.
-setopt correct_all
-
-# CSH_JUNKIE_HISTORY <C>
-# A history reference without an event specifier will always refer to the
-# previous command. Without this option, such a history reference refers
-# to the same event as the previous history reference, defaulting to the
-# previous command.
-#setopt csh_junkie_history
-
-# CSH_JUNKIE_LOOPS <C>
-# Allow loop bodies to take the form `list; end' instead of
-# `do list; done'.
-#setopt csh_junkie_loops
-
-# CSH_JUNKIE_QUOTES <C>
-# Changes the rules for single- and double-quoted text to match that of
-# csh. These require that embedded newlines be preceded by a backslash;
-# unescaped newlines will cause an error message.
-# In double-quoted strings, it is made impossible to escape `$', ``'
-# or `"' (and `\' itself no longer needs escaping).
-# Command substitutions are only expanded once, and cannot be nested.
-#setopt csh_junkie_quotes
-
-# CSH_NULLCMD <C>
-# Do not use the values of NULLCMD and READNULLCMD
-# when running redirections with no command. This make
-# such redirections fail (see section Redirection).
-#setopt csh_nullcmd
-
-# CSH_NULL_GLOB <C>
-# If a pattern for filename generation has no matches,
-# delete the pattern from the argument list;
-# do not report an error unless all the patterns
-# in a command have no matches.
-# Overrides NOMATCH.
-#setopt csh_null_glob
-
-# DVORAK
-# Use the Dvorak keyboard instead of the standard qwerty keyboard as a basis
-# for examining spelling mistakes for the CORRECT and CORRECT_ALL
-# options and the spell-word editor command.
-#setopt dvorak
-
-# EQUALS <Z>
-# Perform = filename expansion.
-# (See section Filename Expansion.)
-#setopt NO_equals
-
-# ERR_EXIT (-e, ksh: -e)
-# If a command has a non-zero exit status, execute the ZERR
-# trap, if set, and exit. This is disabled while running initialization
-# scripts.
-#setopt err_exit
-
-# EXTENDED_GLOB
-# Treat the `#', `~' and `^' characters as part of patterns
-# for filename generation, etc. (An initial unquoted `~'
-# always produces named directory expansion.)
-setopt extended_glob
-
-# EXTENDED_HISTORY <C>
-# Save each command's beginning timestamp (in seconds since the epoch)
-# and the duration (in seconds) to the history file. The format of
-# this prefixed data is:
-# `:<beginning time>:<elapsed seconds>:<command>'.
-#setopt extended_history
-
-# FLOW_CONTROL <D>
-# If this option is unset,
-# output flow control via start/stop characters (usually assigned to
-# ^S/^Q) is disabled in the shell's editor.
-#setopt NO_flow_control
-
-# FUNCTION_ARGZERO <C> <Z>
-# When executing a shell function or sourcing a script, set $0
-# temporarily to the name of the function/script.
-#setopt NO_function_argzero
-
-# GLOB (+F, ksh: +f) <D>
-# Perform filename generation (globbing).
-# (See section Filename Generation.)
-#setopt NO_glob
-
-# GLOBAL_EXPORT (<Z>)
-# If this option is set, passing the -x flag to the builtins declare,
-# float, integer, readonly and typeset (but not local)
-# will also set the -g flag; hence parameters exported to
-# the environment will not be made local to the enclosing function, unless
-# they were already or the flag +g is given explicitly. If the option is
-# unset, exported parameters will be made local in just the same way as any
-# other parameter.
-# This option is set by default for backward compatibility; it is not
-# recommended that its behaviour be relied upon. Note that the builtin
-# export always sets both the -x and -g flags, and hence its
-# effect extends beyond the scope of the enclosing function; this is the
-# most portable way to achieve this behaviour.
-#setopt NO_global_export
-
-
-# GLOBAL_RCS (-d) <D>
-# If this option is unset, the startup files /etc/zprofile,
-# /etc/zshrc, /etc/zlogin and /etc/zlogout will not be run. It
-# can be disabled and re-enabled at any time, including inside local startup
-# files (.zshrc, etc.).
-#setopt NO_global_rcs
-
-# GLOB_ASSIGN <C>
-# If this option is set, filename generation (globbing) is
-# performed on the right hand side of scalar parameter assignments of
-# the form `name=pattern (e.g. `foo=*').
-# If the result has more than one word the parameter will become an array
-# with those words as arguments. This option is provided for backwards
-# compatibility only: globbing is always performed on the right hand side
-# of array assignments of the form `name=(value)'
-# (e.g. `foo=(*)') and this form is recommended for clarity;
-# with this option set, it is not possible to predict whether the result
-# will be an array or a scalar.
-#setopt glob_assign
-
-# GLOB_COMPLETE
-# When the current word has a glob pattern, do not insert all the words
-# resulting from the expansion but generate matches as for completion and
-# cycle through them like MENU_COMPLETE. The matches are generated as if
-# a `*' was added to the end of the word, or inserted at the cursor when
-# COMPLETE_IN_WORD is set. This actually uses pattern matching, not
-# globbing, so it works not only for files but for any completion, such as
-# options, user names, etc.
-setopt glob_complete
-
-# GLOB_DOTS (-4)
-# Do not require a leading `.' in a filename to be matched explicitly.
-#setopt glob_dots
-
-# GLOB_SUBST <C> <K> <S>
-# Treat any characters resulting from parameter expansion as being
-# eligible for file expansion and filename generation, and any
-# characters resulting from command substitution as being eligible
-# for filename generation. Braces (and commas in between) do not
-# become eligible for expansion.
-#setopt glob_subst
-
-# HASH_CMDS <D>
-# Note the location of each command the first time it is executed.
-# Subsequent invocations of the same command will use the
-# saved location, avoiding a path search.
-# If this option is unset, no path hashing is done at all.
-# However, when CORRECT is set, commands whose names do not appear in
-# the functions or aliases hash tables are hashed in order to avoid
-# reporting them as spelling errors.
-#setopt NO_hash_cmds
-
-# HASH_DIRS <D>
-# Whenever a command name is hashed, hash the directory containing it,
-# as well as all directories that occur earlier in the path.
-# Has no effect if neither HASH_CMDS nor CORRECT is set.
-#setopt NO_hash_dirs
-
-# HASH_LIST_ALL <D>
-# Whenever a command completion is attempted, make sure the entire
-# command path is hashed first. This makes the first completion slower.
-#setopt NO_hash_list_all
-
-# HIST_ALLOW_CLOBBER
-# Add `|' to output redirections in the history. This allows history
-# references to clobber files even when CLOBBER is unset.
-setopt NO_hist_allow_clobber
-
-# HIST_BEEP <D>
-# Beep when an attempt is made to access a history entry which
-# isn't there.
-setopt NO_hist_beep
-
-# HIST_EXPIRE_DUPS_FIRST
-# If the internal history needs to be trimmed to add the current command line,
-# setting this option will cause the oldest history event that has a duplicate
-# to be lost before losing a unique event from the list.
-# You should be sure to set the value of HISTSIZE to a larger number
-# than SAVEHIST in order to give you some room for the duplicated
-# events, otherwise this option will behave just like HIST_IGNORE_ALL_DUPS
-# once the history fills up with unique events.
-setopt hist_expire_dups_first
-
-# HIST_FIND_NO_DUPS
-# When searching for history entries in the line editor, do not display
-# duplicates of a line previously found, even if the duplicates are not
-# contiguous.
-setopt hist_find_no_dups
-
-# HIST_IGNORE_ALL_DUPS
-# If a new command line being added to the history list duplicates an
-# older one, the older command is removed from the list (even if it is
-# not the previous event).
-setopt hist_ignore_all_dups
-
-# HIST_IGNORE_DUPS (-h)
-# Do not enter command lines into the history list
-# if they are duplicates of the previous event.
-setopt hist_ignore_dups
-
-# HIST_IGNORE_SPACE (-g)
-# Remove command lines from the history list when the first character on
-# the line is a space, or when one of the expanded aliases contains a
-# leading space.
-# Note that the command lingers in the internal history until the next
-# command is entered before it vanishes, allowing you to briefly reuse
-# or edit the line. If you want to make it vanish right away without
-# entering another command, type a space and press return.
-setopt hist_ignore_space
-
-# HIST_NO_FUNCTIONS
-# Remove function definitions from the history list.
-# Note that the function lingers in the internal history until the next
-# command is entered before it vanishes, allowing you to briefly reuse
-# or edit the definition.
-setopt hist_no_functions
-
-# HIST_NO_STORE
-# Remove the history (fc -l) command from the history list
-# when invoked.
-# Note that the command lingers in the internal history until the next
-# command is entered before it vanishes, allowing you to briefly reuse
-# or edit the line.
-setopt hist_no_store
-
-# HIST_REDUCE_BLANKS
-# Remove superfluous blanks from each command line
-# being added to the history list.
-setopt hist_reduce_blanks
-
-# HIST_SAVE_NO_DUPS
-# When writing out the history file, older commands that duplicate
-# newer ones are omitted.
-setopt hist_save_no_dups
-
-# HIST_VERIFY
-# Whenever the user enters a line with history expansion,
-# don't execute the line directly; instead, perform
-# history expansion and reload the line into the editing buffer.
-setopt hist_verify
-
-# HUP <Z>
-# Send the HUP signal to running jobs when the
-# shell exits.
-setopt NO_hup
-
-# IGNORE_BRACES (-I) <S>
-# Do not perform brace expansion.
-#setopt ignore_braces
-
-# IGNORE_EOF (-7)
-# Do not exit on end-of-file. Require the use
-# of exit or logout instead.
-# However, ten consecutive EOFs will cause the shell to exit anyway,
-# to avoid the shell hanging if its tty goes away.
-# Also, if this option is set and the Zsh Line Editor is used, widgets
-# implemented by shell functions can be bound to EOF (normally
-# Control-D) without printing the normal warning message. This works
-# only for normal widgets, not for completion widgets.
-#setopt ignore_eof
-
-# INC_APPEND_HISTORY
-# This options works like APPEND_HISTORY except that new history lines
-# are added to the $HISTFILE incrementally (as soon as they are
-# entered), rather than waiting until the shell is killed.
-# The file is periodically trimmed to the number of lines specified by
-# $SAVEHIST, but can exceed this value between trimmings.
-setopt inc_append_history
-
-# INTERACTIVE (-i, ksh: -i)
-# This is an interactive shell. This option is set upon initialisation if
-# the standard input is a tty and commands are being read from standard input.
-# (See the discussion of SHIN_STDIN.)
-# This heuristic may be overridden by specifying a state for this option
-# on the command line.
-# The value of this option cannot be changed anywhere other than the command line.
-#setopt NO_interactive
-
-# INTERACTIVE_COMMENTS (-k) <K> <S>
-# Allow comments even in interactive shells.
-setopt interactive_comments
-
-# KSH_ARRAYS <K> <S>
-# Emulate ksh array handling as closely as possible. If this option
-# is set, array elements are numbered from zero, an array parameter
-# without subscript refers to the first element instead of the whole array,
-# and braces are required to delimit a subscript (`${path[2]}' rather
-# than just `$path[2]').
-#setopt ksh_arrays
-
-# KSH_AUTOLOAD <K> <S>
-# Emulate ksh function autoloading. This means that when a function is
-# autoloaded, the corresponding file is merely executed, and must define
-# the function itself. (By default, the function is defined to the contents
-# of the file. However, the most common ksh-style case - of the file
-# containing only a simple definition of the function - is always handled
-# in the ksh-compatible manner.)
-#setopt ksh_autoload
-
-# KSH_GLOB <K>
-# In pattern matching, the interpretation of parentheses is affected by
-# a preceding `@', `*', `+', `?' or `!'. See section Filename Generation.
-#setopt ksh_glob
-
-# KSH_OPTION_PRINT <K>
-# Alters the way options settings are printed: instead of separate lists of
-# set and unset options, all options are shown, marked `on' if
-# they are in the non-default state, `off' otherwise.
-#setopt ksh_option_print
-
-# KSH_TYPESET <K>
-# Alters the way arguments to the typeset family of commands, including
-# declare, export, float, integer, local and
-# readonly, are processed. Without this option, zsh will perform normal
-# word splitting after command and parameter expansion in arguments of an
-# assignment; with it, word splitting does not take place in those cases.
-#setopt ksh_typeset
-
-# LIST_AMBIGUOUS <D>
-# This option works when AUTO_LIST or BASH_AUTO_LIST is also
-# set. If there is an unambiguous prefix to insert on the command line,
-# that is done without a completion list being displayed; in other
-# words, auto-listing behaviour only takes place when nothing would be
-# inserted. In the case of BASH_AUTO_LIST, this means that the list
-# will be delayed to the third call of the function.
-#setopt NO_list_ambiguous
-
-# LIST_BEEP <D>
-# Beep on an ambiguous completion. More accurately, this forces the
-# completion widgets to return status 1 on an ambiguous completion, which
-# causes the shell to beep if the option BEEP is also set; this may
-# be modified if completion is called from a user-defined widget.
-setopt NO_list_beep
-
-# LIST_PACKED
-# Try to make the completion list smaller (occupying less lines) by
-# printing the matches in columns with different widths.
-setopt list_packed
-
-# LIST_ROWS_FIRST
-# Lay out the matches in completion lists sorted horizontally, that is,
-# the second match is to the right of the first one, not under it as
-# usual.
-setopt NO_list_rows_first
-
-# LIST_TYPES (-X)
-# When listing files that are possible completions, show the
-# type of each file with a trailing identifying mark.
-setopt list_types
-
-# LOCAL_OPTIONS <K>
-# If this option is set at the point of return from a shell function,
-# all the options (including this one) which were in force upon entry to
-# the function are restored. Otherwise, only this option and the XTRACE
-# and PRINT_EXIT_VALUE options are restored. Hence
-# if this is explicitly unset by a shell function the other options in
-# force at the point of return will remain so.
-# A shell function can also guarantee itself a known shell configuration
-# with a formulation like `emulate -L zsh'; the -L activates LOCAL_OPTIONS.
-#setopt local_options
-
-# LOCAL_TRAPS <K>
-# If this option is set when a signal trap is set inside a function, then the
-# previous status of the trap for that signal will be restored when the
-# function exits. Note that this option must be set prior to altering the
-# trap behaviour in a function; unlike LOCAL_OPTIONS, the value on exit
-# from the function is irrelevant. However, it does not need to be set
-# before any global trap for that to be correctly restored by a function.
-# For example,
-# unsetopt localtraps
-# trap - INT
-# fn() { setopt localtraps; trap '{}' INT; sleep 3; }
-# will restore normally handling of SIGINT after the function exits.
-#setopt local_traps
-
-# LONG_LIST_JOBS (-R)
-# List jobs in the long format by default.
-setopt long_list_jobs
-
-# MAGIC_EQUAL_SUBST
-# All unquoted arguments of the form `anything=expression'
-# appearing after the command name have filename expansion (that is,
-# where expression has a leading `~' or `=') performed on
-# expression as if it were a parameter assignment. The argument is
-# not otherwise treated specially; it is passed to the command as a single
-# argument, and not used as an actual parameter assignment.
-# For example, in echo foo=~/bar:~/rod, both occurrences of ~ would be replaced.
-# Note that this happens anyway with typeset and similar statements.
-# This option respects the setting of the KSH_TYPESET option.
-# In other words, if both options are in effect, arguments looking like
-# assignments will not undergo wordsplitting.
-setopt magic_equal_subst
-
-
-# MAIL_WARNING (-U)
-# Print a warning message if a mail file has been
-# accessed since the shell last checked.
-setopt mail_warning
-
-# MARK_DIRS (-8, ksh: -X)
-# Append a trailing `/' to all directory
-# names resulting from filename generation (globbing).
-#setopt mark_dirs
-
-# MENU_COMPLETE (-Y)
-# On an ambiguous completion, instead of listing possibilities or beeping,
-# insert the first match immediately. Then when completion is requested
-# again, remove the first match and insert the second match, etc.
-# When there are no more matches, go back to the first one again.
-# reverse-menu-complete may be used to loop through the list
-# in the other direction. This option overrides AUTO_MENU.
-#setopt menu_complete
-
-# MONITOR (-m, ksh: -m)
-# Allow job control. Set by default in interactive shells.
-#setopt NO_monitor
-
-# MULTIOS <Z>
-# Perform implicit tees or cats when multiple
-# redirections are attempted (see section Redirection).
-#setopt NO_multios
-
-# NOMATCH (+3) <C> <Z>
-# If a pattern for filename generation has no matches,
-# print an error, instead of
-# leaving it unchanged in the argument list.
-# This also applies to file expansion
-# of an initial `~' or `='.
-#setopt NO_nomatch
-
-# NOTIFY (-5, ksh: -b) <Z>
-# Report the status of background jobs immediately, rather than
-# waiting until just before printing a prompt.
-#setopt NO_notify
-
-# NULL_GLOB (-G)
-# If a pattern for filename generation has no matches,
-# delete the pattern from the argument list instead of reporting an error.
-# Overrides NOMATCH.
-setopt null_glob
-
-# NUMERIC_GLOB_SORT
-# If numeric filenames are matched by a filename generation pattern,
-# sort the filenames numerically rather than lexicographically.
-setopt NO_numeric_glob_sort
-
-# OCTAL_ZEROES <S>
-# Interpret any integer constant beginning with a 0 as octal, per IEEE Std
-# 1003.2-1992 (ISO 9945-2:1993). This is not enabled by default as it
-# causes problems with parsing of, for example, date and time strings with
-# leading zeroes.
-#setopt octal_zeroes
-
-# OVERSTRIKE
-# Start up the line editor in overstrike mode.
-#setopt overstrike
-
-# PATH_DIRS (-Q)
-# Perform a path search even on command names with slashes in them.
-# Thus if `/usr/local/bin' is in the user's path, and he or she types
-# `X11/xinit', the command `/usr/local/bin/X11/xinit' will be executed
-# (assuming it exists).
-# Commands explicitly beginning with `/', `./' or `../'
-# are not subject to the path search.
-# This also applies to the . builtin.
-# Note that subdirectories of the current directory are always searched for
-# executables specified in this form. This takes place before any search
-# indicated by this option, and regardless of whether `.' or the current
-# directory appear in the command search path.
-setopt NO_path_dirs
-
-
-# POSIX_BUILTINS <K> <S>
-# When this option is set the command builtin can be used to execute
-# shell builtin commands. Parameter assignments specified before shell
-# functions and special builtins are kept after the command completes unless
-# the special builtin is prefixed with the command builtin. Special
-# builtins are
-# .,:,break,continue,declare,eval,exit,
-# export,integer,local,readonly,return,set,shift,source,times,trap and unset.
-#setopt posix_builtins
-
-# PRINT_EIGHT_BIT
-# Print eight bit characters literally in completion lists, etc.
-# This option is not necessary if your system correctly returns the
-# printability of eight bit characters (see man page ctype(3)).
-setopt print_eight_bit
-
-# PRINT_EXIT_VALUE (-1)
-# Print the exit value of programs with non-zero exit status.
-#setopt print_exit_value
-
-# PRIVILEGED (-p, ksh: -p)
-# Turn on privileged mode. This is enabled automatically on startup if the
-# effective user (group) ID is not equal to the real user (group) ID. Turning
-# this option off causes the effective user and group IDs to be set to the
-# real user and group IDs. This option disables sourcing user startup files.
-# If zsh is invoked as `sh' or `ksh' with this option set,
-# /etc/suid_profile is sourced (after /etc/profile on interactive
-# shells). Sourcing ~/.profile is disabled and the contents of the
-# ENV variable is ignored. This option cannot be changed using the
-# -m option of setopt and unsetopt, and changing it inside a
-# function always changes it globally regardless of the LOCAL_OPTIONS
-# option.
-#setopt privileged
-
-# PROMPT_BANG <K>
-# If set, `!' is treated specially in prompt expansion.
-# See section Prompt Expansion.
-#setopt prompt_bang
-
-# PROMPT_CR (+V) <D>
-# Print a carriage return just before printing
-# a prompt in the line editor. This is on by default as multi-line editing
-# is only possible if the editor knows where the start of the line appears.
-#setopt NO_prompt_cr
-
-# PROMPT_PERCENT <C> <Z>
-# If set, `%' is treated specially in prompt expansion.
-# See section Prompt Expansion.
-#setopt NO_prompt_percent
-
-# PROMPT_SUBST <K>
-# If set, parameter expansion, command substitution and
-# arithmetic expansion are performed in prompts.
-#setopt prompt_subst
-
-# PUSHD_IGNORE_DUPS
-# Don't push multiple copies of the same directory onto the directory stack.
-setopt pushd_ignore_dups
-
-# PUSHD_MINUS
-# Exchanges the meanings of `+' and `-'
-# when used with a number to specify a directory in the stack.
-setopt pushd_minus
-
-# PUSHD_SILENT (-E)
-# Do not print the directory stack after pushd or popd.
-setopt pushd_silent
-
-# PUSHD_TO_HOME (-D)
-# Have pushd with no arguments act like `pushd $HOME'.
-#setopt NO_pushd_to_home
-
-# RC_EXPAND_PARAM (-P)
-# Array expansions of the form
-# `foo${xx}bar', where the parameter
-# xx is set to (a b c), are substituted with
-# `fooabar foobbar foocbar' instead of the default
-# `fooa b cbar'.
-#setopt rc_expand_param
-
-# RC_QUOTES
-# Allow the character sequence `'{'}' to signify a single quote
-# within singly quoted strings. Note this does not apply in quoted strings
-# using the format $'...', where a backslashed single quote can
-# be used.
-setopt rc_quotes
-
-# RCS (+f) <D>
-# After /etc/zshenv is sourced on startup, source the
-# .zshenv, /etc/zprofile, .zprofile,
-# /etc/zshrc, .zshrc, /etc/zlogin, .zlogin, and .zlogout
-# files, as described in section Files.
-# If this option is unset, the /etc/zshenv file is still sourced, but any
-# of the others will not be; it can be set at any time to prevent the
-# remaining startup files after the currently executing one from
-# being sourced.
-#setopt NO_rcs
-
-# REC_EXACT (-S)
-# In completion, recognize exact matches even
-# if they are ambiguous.
-#setopt rec_exact
-
-# RESTRICTED (-r)
-# Enables restricted mode. This option cannot be changed using
-# unsetopt, and setting it inside a function always changes it
-# globally regardless of the LOCAL_OPTIONS option. See
-# section Restricted Shell.
-#setopt restricted
-
-# RM_STAR_SILENT (-H) <K> <S>
-# Do not query the user before executing `rm *' or `rm path/*'.
-#setopt rm_star_silent
-
-# RM_STAR_WAIT
-# If querying the user before executing `rm *' or `rm path/*',
-# first wait ten seconds and ignore anything typed in that time.
-# This avoids the problem of reflexively answering `yes' to the query
-# when one didn't really mean it. The wait and query can always be
-# avoided by expanding the `*' in ZLE (with tab).
-#setopt rm_star_wait
-
-# SHARE_HISTORY <K>
-# This option both imports new commands from the history file, and also
-# causes your typed commands to be appended to the history file (the
-# latter is like specifying INC_APPEND_HISTORY).
-# The history lines are also output with timestamps ala
-# EXTENDED_HISTORY (which makes it easier to find the spot where
-# we left off reading the file after it gets re-written).
-setopt share_history
-
-# SH_FILE_EXPANSION <K> <S>
-# Perform filename expansion (e.g., ~ expansion) before
-# parameter expansion, command substitution, arithmetic expansion
-# and brace expansion.
-# If this option is unset, it is performed after
-# brace expansion, so things like `~$USERNAME' and
-# `~{pfalstad,rc}' will work.
-#setopt sh_file_expansion
-
-# SH_GLOB <K> <S>
-# Disables the special meaning of `(', `|', `)'
-# and '<' for globbing the result of parameter and command substitutions,
-# and in some other places where
-# the shell accepts patterns. This option is set by default if zsh is
-# invoked as sh or ksh.
-#setopt sh_glob
-
-# SHIN_STDIN (-s, ksh: -s)
-# Commands are being read from the standard input.
-# Commands are read from standard input if no command is specified with
-# -c and no file of commands is specified. If SHIN_STDIN
-# is set explicitly on the command line,
-# any argument that would otherwise have been
-# taken as a file to run will instead be treated as a normal positional
-# parameter.
-# Note that setting or unsetting this option on the command line does not
-# necessarily affect the state the option will have while the shell is
-# running - that is purely an indicator of whether on not commands are
-# actually being read from standard input. The value of this option
-# cannot be changed anywhere other
-# than the command line.
-#setopt shin_stdin
-
-# SH_NULLCMD <K> <S>
-# Do not use the values of NULLCMD and READNULLCMD
-# when doing redirections, use `:' instead (see section Redirection).
-#setopt sh_nullcmd
-
-# SH_OPTION_LETTERS <K> <S>
-# If this option is set the shell tries to interpret single letter options
-# (which are used with set and setopt) like ksh does.
-# This also affects the value of the - special parameter.
-#setopt sh_option_letters
-
-# SHORT_LOOPS <C> <Z>
-# Allow the short forms of for, select,
-# if, and function constructs.
-#setopt NO_short_loops
-
-# SH_WORD_SPLIT (-y) <K> <S>
-# Causes field splitting to be performed on unquoted parameter expansions.
-# Note that this option has nothing to do with word splitting.
-# (See section Parameter Expansion.)
-#setopt sh_word_split
-
-# SINGLE_COMMAND (-t, ksh: -t)
-# If the shell is reading from standard input, it exits after a single command
-# has been executed. This also makes the shell non-interactive, unless the
-# INTERACTIVE option is explicitly set on the command line.
-# The value of this option cannot be changed anywhere other than the command line.
-#setopt single_command
-
-# SINGLE_LINE_ZLE (-M) <K>
-# Use single-line command line editing instead of multi-line.
-#setopt single_line_zle
-
-# SUN_KEYBOARD_HACK (-L)
-# If a line ends with a backquote, and there are an odd number
-# of backquotes on the line, ignore the trailing backquote.
-# This is useful on some keyboards where the return key is
-# too small, and the backquote key lies annoyingly close to it.
-#setopt sun_keyboard_hack
-
-# UNSET (+u, ksh: +u) <K> <S> <Z>
-# Treat unset parameters as if they were empty when substituting.
-# Otherwise they are treated as an error.
-#setopt NO_unset
-
-# VERBOSE (-v, ksh: -v)
-# Print shell input lines as they are read.
-#setopt verbose
-
-# XTRACE (-x, ksh: -x)
-# Print commands and their arguments as they are executed.
-#setopt xtrace
-
-# ZLE (-Z)
-# Use the zsh line editor. Set by default in interactive shells connected to
-# a terminal.
-#setopt NO_zle
-
+++ /dev/null
-# zsh mouse (and X clipboard) support v1.4
-#
-# QUICKSTART: jump to "how to use" below.
-#
-# currently supported:
-# - VT200 mouse tracking (at least xterm, gnome-terminal, rxvt)
-# - GPM on Linux little-endian systems such as i386 (at least)
-# - X clipboard handling if xsel(1) or xclip(1) is available (see
-# note below).
-#
-# addionnaly, if you are using xterm and don't want to use the mouse
-# tracking system, you can map some button click events so that they
-# send \E[M<bt>^X[<y><x> where <bt> is the character 0x20 + (0, 1, 2)
-# <x>,<y> are the coordinate of the mouse pointer. This is usually done
-# by adding those lines to your resource file for XTerm (~/.Xdefaults
-# for example):
-#
-# XTerm.VT100.translations: #override\
-# Mod4 <Btn1Up>: ignore()\n\
-# Mod4 <Btn2Up>: ignore()\n\
-# Mod4 <Btn3Up>: ignore()\n\
-# Mod4 <Btn1Down>: string(0x1b) string("[M ") dired-button()\n\
-# Mod4 <Btn2Down>: string(0x1b) string("[M!") dired-button()\n\
-# Mod4 <Btn3Down>: string(0x1b) string("[M") string(0x22) dired-button()\n\
-# Mod4 <Btn4Down>,<Btn4Up>: string(0x10)\n\
-# Mod4 <Btn5Down>,<Btn5Up>: string(0xe)
-#
-# That maps the button click events with the modifier 4 (when you hold
-# the <Super> Key [possibly Windows keys] under recent versions of
-# XFree86). The last two lines are for an easy support of the mouse
-# wheel (map the mouse wheel events to ^N and ^P)
-#
-# Remember that even if you use the mouse tracking, you can still have
-# access to the normal xterm selection mechanism by holding the <Shift>
-# key.
-#
-# Note about X selection.
-# By default, xterm uses the PRIMARY selection instead of CLIPBOARD
-# for copy-paste. You may prefer changing that if you want
-# <Shift-Insert> to insert the CLIPBOARD and a better communication
-# between xterm and clipboard based applications like mozilla.
-# A way to do that is to add those resources:
-# XTerm.VT100.translations: #override\
-# Shift ~Ctrl <KeyPress> Insert:insert-selection(\
-# CLIPBOARD, CUT_BUFFER0, PRIMARY) \n\
-# Shift Ctrl <KeyPress> Insert:insert-selection(\
-# PRIMARY, CUT_BUFFER0, CLIPBOARD) \n\
-# ~Ctrl ~Meta<BtnUp>: select-end(PRIMARY,CUT_BUFFER0,CLIPBOARD)
-#
-# and to run a clipboard manager application such as xclipboard
-# (whose invocation you may want to put in your X session startup
-# file). (<Shift-Ctrl-Insert> inserts the PRIMARY selection as does
-# the middle mouse button). (without xclipboard, the clipboard
-# content is lost whenever the text is no more selected).
-#
-# How to use:
-#
-# add to your ~/.zshrc:
-# . /path/to/this-file
-# zle-toggle-mouse
-#
-# and if you want to be able to toggle on/off the mouse support:
-# bindkey -M emacs '\em' zle-toggle-mouse
-# # <Esc>m to toggle the mouse in emacs mode
-# bindkey -M vicmd M zle-toggle-mouse
-# # M for vi (cmd) mode
-#
-# clicking on the button 1:
-# moves the cursor to the pointed location
-# clicking on the button 2:
-# inserts zsh cutbuffer at pointed location. If $DISPLAY is set and
-# either the xsel(1) or xclip(1) command is available, then it's the
-# content of the X clipboard instead that is pasted (and stored into
-# zsh cutbuffer).
-# clicking on the button 3:
-# stores the text between the cursor and the pointed localion
-# into zsh cutbuffer. Additionaly, if $DISPLAY is set and either the
-# xclip(1) or xsel(1) command is available, that text is put on the
-# clipboard.
-#
-# If xsel or xlip is available, and $DISPLAY is set (and you're in a
-# xterm-like terminal (even though that feature is terminal
-# independant)), all the keys (actually widgets) that deal with zsh
-# cut buffer have been modified so that the X CLIPBOARD selection is
-# used. So <Ctrl-U>, <Ctrl-W>... will put the killed region on the X
-# clipboard. vi mode "p" or emacs "<Ctrl-Y>" will paste the X CLIPBOARD
-# selection. Only the keys that delete one character are not affected
-# (<Del>, <Backspace>, <x>). Additionnaly, the primary selection (what
-# is mouse highlighted and that you paste with the middle button) is put
-# on the clipboard (and so made available to zsh) when you press
-# <Meta-Insert> or <Ctrl-Insert> or <Ctrl-X>X (emacs mode) or X (vicmd
-# mode). (note that your terminal may already do that by default, also
-# note that your terminal may paste the primary selection and not the
-# clipboard on <Shift-Insert>, you may change that if you find it
-# confusing (see above))
-#
-# for GPM, you may change the list of modifiers (Shift, Alt...) that
-# need to be on for the event to be accepted (see below).
-#
-# kterm: same as for xterm, but replace XTerm with KTerm in the resource
-# customization
-# hanterm: same as for xterm, but replace XTerm with Hanterm in the
-# resource customization.
-# Eterm: the paste(clipboard) actions don't seem to work, future
-# versions of mouse.zsh may include support for X cutbuffers or revert
-# back to PRIMARY selection to provide a better support for Eterm.
-# gnome-terminal: you may want to bind some keys to Edit->{copy,paste}
-# multi-gnome-terminal: selection looks mostly bogus to me
-# rxvt,aterm,[ckgt]aterm,mlterm,pterm: no support for clipboard.
-# GNUstep terminal: no mouse support but support for clipboard via menu
-# KDE x-terminal-emulator: works OK except mouse button3 that is mapped
-# to the context menu. Use Ctrl-Insert to put the selection on the
-# clipboard.
-# dtterm: no mouse support but the selection works OK.
-#
-# bugs:
-# - the GPM support was not much tested (was tested with gpm 1.19.6 on
-# a linux 2.6.9, AMD Athlon)
-# - mouse positionning doesn't work properly in "vared" if a prompt
-# was provided (vared -p <prompt>)
-#
-# Todo:
-# - write proper documentation
-# - customization through zstyles.
-#
-# Author:
-# Stephane Chazelas <Stephane_Chazelas@yahoo.fr>
-#
-# Changes:
-# v1.4 2005-03-01: <Ctrl-W><Ctrl-W> puts both words on the cut buffer
-# support for CUT_BUFFER0 via xprop.
-# v1.3 2005-02-28: support for more X terminals, tidy-up, separate
-# mouse support from clipboard support
-# v1.2 2005-02-24: support for vi-mode. X clipboard mirroring zsh cut buffer
-# when possible. Bug fixes.
-# v1.1 2005-02-20: support for X selection through xsel or xclip
-# v1.0 2004-11-18: initial release
-
-# UTILITY FUNCTIONS
-
-zle-error() {
- local IFS=" "
- if [[ -n $WIDGET ]]; then
- # error message if zle active
- zle -M -- "$*"
- else
- # on stderr otherwise
- print -ru2 -- "$*"
- fi
-}
-
-# SELECTION/CLIPBOARD FUNCTIONS
-
-set-x-clipboard() { return 0; }
-get-x-clipboard() { return 1; }
-
-if
- # find a command to read from/write to the X selections
- if whence xsel > /dev/null 2>&1; then
- x_selection_tool="xsel -p"
- x_clipboard_tool="xsel -b"
- elif whence xclip > /dev/null 2>&1; then
- x_selection_tool="xclip -sel p"
- x_clipboard_tool="xclip -sel c"
- fi
-then
- eval '
- get-x-clipboard() {
- (( $+DISPLAY )) || return 1
- local r
- r=$('$x_clipboard_tool' -o < /dev/null 2> /dev/null && print .)
- r=${r%.}
- if [[ -n $r && $r != $CUTBUFFER ]]; then
- killring=("$CUTBUFFER" "${(@)killring[1,-2]}")
- CUTBUFFER=$r
- fi
- }
- set-x-clipboard() {
- (( ! $+DISPLAY )) ||
- print -rn -- "$1" | '$x_clipboard_tool' -i 2> /dev/null
- }
- push-x-cut_buffer0() {
- # retrieve the CUT_BUFFER0 property via xprop and store it on the
- # CLIPBOARD selection
- (( $+DISPLAY )) || return 1
- local r
- r=$(xprop -root -notype 8s \$0 CUT_BUFFER0 2> /dev/null) || return 1
- r=${r#CUT_BUFFER0\"}
- r=${r%\"}
- r=${r//\'\''/\\\'\''}
- eval print -rn -- \$\'\''$r\'\'' | '$x_clipboard_tool' -i 2> /dev/null
- }
- push-x-selection() {
- # puts the PRIMARY selection onto the CLIPBOARD
- # failing that call push-x-cut_buffer0
- (( $+DISPLAY )) || return 1
- local r
- if r=$('$x_selection_tool' -o < /dev/null 2> /dev/null && print .) &&
- r=${r%?} &&
- [[ -n $r ]]; then
- print -rn -- $r | '$x_clipboard_tool' -i 2> /dev/null
- else
- push-x-cut_buffer0
- fi
- }
- '
- # redefine the copying widgets so that they update the clipboard.
- for w in copy-region-as-kill vi-delete vi-yank vi-change vi-change-whole-line vi-change-eol; do
- eval '
- '$w'() {
- zle .'$w'
- set-x-clipboard $CUTBUFFER
- }
- zle -N '$w
- done
-
- # that's a bit more complicated for those ones as we have to
- # re-implement the special behavior that does that if you call several
- # of those widgets in sequence, the text on the clipboard is the
- # whole text cut, not just the text cut by the latest widget.
- for w in ${widgets[(I).*kill-*]}; do
- if [[ $w = *backward* ]]; then
- e='$CUTBUFFER$scb'
- else
- e='$scb$CUTBUFFER'
- fi
- eval '
- '${w#.}'() {
- local scb=$CUTBUFFER
- local slw=$LASTWIDGET
- local sbl=${#BUFFER}
-
- zle '$w'
- (( $sbl == $#BUFFER )) && return
- if [[ $slw = (.|)(backward-|)kill-* ]]; then
- killring=("${(@)killring[2,-1]}")
- CUTBUFFER='$e'
- fi
- set-x-clipboard $CUTBUFFER
- }
- zle -N '${w#.}
- done
-
- zle -N push-x-selection
- zle -N push-x-cut_buffer0
-
- # put the current selection on the clipboard upon <Ctrl-Insert>
- # <Meta-Insert> <Ctrl-X>X or X:
- if (( $+terminfo[kSI] )); then
- bindkey -M emacs "$terminfo[kSI]" push-x-selection
- bindkey -M viins "$terminfo[kSI]" push-x-selection
- bindkey -M vicmd "$terminfo[kSI]" push-x-selection
- fi
- if (( $+terminfo[kich1] )); then
- # <Meta-Insert> according to terminfo
- bindkey -M emacs "\e$terminfo[kich1]" push-x-selection
- bindkey -M viins "\e$terminfo[kich1]" push-x-selection
- bindkey -M vicmd "\e$terminfo[kich1]" push-x-selection
- fi
- # hardcode ^[[2;3~ which is sent by <Meta-Insert> on xterm
- bindkey -M emacs '\e[2;3~' push-x-selection
- bindkey -M viins '\e[2;3~' push-x-selection
- bindkey -M vicmd '\e[2;3~' push-x-selection
- # hardcode ^[^[[2;5~ which is sent by <Meta-Insert> on some terminals
- bindkey -M emacs '\e\e[2~' push-x-selection
- bindkey -M viins '\e\e[2~' push-x-selection
- bindkey -M vicmd '\e\e[2~' push-x-selection
-
- # hardcode ^[[2;5~ which is sent by <Ctrl-Insert> on xterm
- # some terminals have already such a feature builtin (gnome/KDE
- # terminals), others have no distinguishable character sequence sent
- # by <Ctrl-Insert>
- bindkey -M emacs '\e[2;5~' push-x-selection
- bindkey -M viins '\e[2;5~' push-x-selection
- bindkey -M vicmd '\e[2;5~' push-x-selection
-
- # for terminal without an insert key:
- bindkey -M vicmd X push-x-selection
- bindkey -M emacs '^XX' push-x-selection
-
- # the convoluted stuff below is to work around two problems:
- # 1- we can't just redefine the widgets as then yank-pop would
- # stop working
- # 2- we can't just rebind the keys to <Ctrl-Insert><other-key> as
- # then we'll loose the numeric argument
- propagate-numeric() {
- # next key (\e[0-dum) is mapped to <Ctrl-Insert>, plus the
- # targeted widget with NUMERIC restored.
- case $KEYMAP in
- vicmd)
- bindkey -M vicmd -s '\e[0-dum' $'\e[1-dum'$NUMERIC${KEYS/x/};;
- *)
- bindkey -M $KEYMAP -s '\e[0-dum' $'\e[1-dum'${NUMERIC//(#m)?/$'\e'$MATCH}${KEYS/x/};;
- esac
- }
- zle -N get-x-clipboard
- zle -N propagate-numeric
- bindkey -M emacs '\e[1-dum' get-x-clipboard
- bindkey -M vicmd '\e[1-dum' get-x-clipboard
- bindkey -M emacs '\e[2-dum' yank
- bindkey -M emacs '\e[2-xdum' propagate-numeric
- bindkey -M emacs -s '^Y' $'\e[2-xdum\e[0-dum'
- bindkey -M vicmd '\e[3-dum' vi-put-before
- bindkey -M vicmd '\e[3-xdum' propagate-numeric
- bindkey -M vicmd -s 'P' $'\e[3-xdum\e[0-dum'
- bindkey -M vicmd '\e[4-dum' vi-put-after
- bindkey -M vicmd '\e[4-xdum' propagate-numeric
- bindkey -M vicmd -s 'p' $'\e[4-xdum\e[0-dum'
-fi
-
-
-# MOUSE FUNCTIONS
-
-zle-update-mouse-driver() {
- # default is no mouse support
- [[ -n $ZLE_USE_MOUSE ]] && zle-error 'Sorry: mouse not supported'
- ZLE_USE_MOUSE=
-}
-
-
-if [[ $TERM = *[xeEk]term* ||
- $TERM = *mlterm* ||
- $TERM = *rxvt* ||
- $TERM = *screen* ||
- ($TERM = *linux* && -S /dev/gpmctl)
- ]]; then
-
- set-status() { return $1; }
-
- handle-mouse-event() {
- emulate -L zsh
- local bt=$1
-
- case $bt in
- 3)
- return 0;; # Process on press, discard release
- # mlterm sends 3 on mouse-wheel-up but also on every button
- # release, so it's unusable
- 64)
- # eterm, rxvt, gnome/KDE terminal mouse wheel
- zle up-line-or-history
- return;;
- 4|65)
- # mlterm or eterm, rxvt, gnome/KDE terminal mouse wheel
- zle down-line-or-history
- return;;
- esac
- local mx=$2 my=$3 last_status=$4
- local cx cy i
- setopt extendedglob
-
- print -n '\e[6n' # query cursor position
-
- local match mbegin mend buf=
-
- while read -k i && buf+=$i && [[ $buf != *\[([0-9]##)\;[0-9]##R ]]; do :; done
- # read response from terminal.
- # note that we may also get a mouse tracking btn-release event,
- # which would then be discarded.
-
- [[ $buf = (#b)*\[([0-9]##)\;[0-9]##R ]] || return
- cy=$match[1] # we don't need cx
-
- local cur_prompt
-
- # trying to guess the current prompt
- case $CONTEXT in
- (vared)
- if [[ $0 = zcalc ]]; then
- cur_prompt=${ZCALCPROMPT-'%1v> '}
- setopt nopromptsubst nopromptbang promptpercent
- # (ZCALCPROMPT is expanded with (%))
- fi;;
- # if vared is passed a prompt, we're lost
- (select)
- cur_prompt=$PS3;;
- (cont)
- cur_prompt=$PS2;;
- (start)
- cur_prompt=$PS1;;
- esac
-
- # if promptsubst, then we need first to do the expansions (to
- # be able to remove the visual effects) and disable further
- # expansions
- [[ -o promptsubst ]] && cur_prompt=${${(e)cur_prompt}//(#b)([\\\$\`])/\\$match}
-
- # restore the exit status in case $PS<n> relies on it
- set-status $last_status
-
- # remove the visual effects and do the prompt expansion
- cur_prompt=${(S%%)cur_prompt//(#b)(%([BSUbsu]|{*%})|(%[^BSUbsu{}]))/$match[3]}
-
- # we're now looping over the whole editing buffer (plus the last
- # line of the prompt) to compute the (x,y) position of each char. We
- # store the characters i for which x(i) <= mx < x(i+1) for every
- # value of y in the pos array. We also get the Y(CURSOR), so that at
- # the end, we're able to say which pos element is the right one
-
- local -a pos # array holding the possible positions of
- # the mouse pointer
- local -i n x=0 y=1 cursor=$((${#cur_prompt}+$CURSOR+1))
- local Y
-
- buf=$cur_prompt$BUFFER
- for ((i=1; i<=$#buf; i++)); do
- (( i == cursor )) && Y=$y
- n=0
- case $buf[i] in
- ($'\n') # newline
- : ${pos[y]=$i}
- (( y++, x=0 ));;
- ($'\t') # tab advance til next tab stop
- (( x = x/8*8+8 ));;
- ([$'\0'-$'\037'$'\200'-$'\237'])
- # characters like ^M
- n=2;;
- (*)
- n=1;;
- esac
- while
- (( x >= mx )) && : ${pos[y]=$i}
- (( x >= COLUMNS )) && (( x=0, y++ ))
- (( n > 0 ))
- do
- (( x++, n-- ))
- done
- done
- : ${pos[y]=$i} ${Y:=$y}
-
- local mouse_CURSOR
- if ((my + Y - cy > y)); then
- mouse_CURSOR=$#BUFFER
- elif ((my + Y - cy < 1)); then
- mouse_CURSOR=0
- else
- mouse_CURSOR=$(($pos[my + Y - cy] - ${#cur_prompt} - 1))
- fi
-
- case $bt in
- (0)
- # Button 1. Move cursor.
- CURSOR=$mouse_CURSOR
- ;;
-
- (1)
- # Button 2. Insert selection at mouse cursor postion.
- get-x-clipboard
- BUFFER=$BUFFER[1,mouse_CURSOR]$CUTBUFFER$BUFFER[mouse_CURSOR+1,-1]
- (( CURSOR = $mouse_CURSOR + $#CUTBUFFER ))
- ;;
-
- (2)
- # Button 3. Copy from cursor to mouse to cutbuffer.
- killring=("$CUTBUFFER" "${(@)killring[1,-2]}")
- if (( mouse_CURSOR < CURSOR )); then
- CUTBUFFER=$BUFFER[mouse_CURSOR+1,CURSOR+1]
- else
- CUTBUFFER=$BUFFER[CURSOR+1,mouse_CURSOR+1]
- fi
- set-x-clipboard $CUTBUFFER
- ;;
- esac
- }
-
- handle-xterm-mouse-event() {
- local last_status=$?
- emulate -L zsh
- local bt mx my
-
- # either xterm mouse tracking or binded xterm event
- # read the event from the terminal
- read -k bt # mouse button, x, y reported after \e[M
- bt=$((#bt & 0x47))
- read -k mx
- read -k my
- if [[ $mx = $'\030' ]]; then
- # assume event is \E[M<btn>dired-button()(^X\EG<x><y>)
- read -k mx
- read -k mx
- read -k my
- (( my = #my - 31 ))
- (( mx = #mx - 31 ))
- else
- # that's a VT200 mouse tracking event
- (( my = #my - 32 ))
- (( mx = #mx - 32 ))
- fi
- handle-mouse-event $bt $mx $my $last_status
- }
-
- zle -N handle-xterm-mouse-event
-
- if [[ $TERM = *linux* && -S /dev/gpmctl ]]; then
- # GPM mouse support
- if zmodload -i zsh/net/socket; then
-
- zle-update-mouse-driver() {
- if [[ -n $ZLE_USE_MOUSE ]]; then
- if (( ! $+ZSH_GPM_FD )); then
- if zsocket -d 9 /dev/gpmctl; then
- ZSH_GPM_FD=$REPLY
- # gpm initialisation:
- # request single click events with given modifiers
- local -A modifiers
- modifiers=(
- none 0
- shift 1
- altgr 2
- ctrl 4
- alt 8
- left-shift 16
- right-shift 32
- left-ctrl 64
- right-ctrl 128
- caps-shift 256
- )
- local min max
- # modifiers that need to be on
- min=$((modifiers[none]))
- # modifiers that may be on
- max=$min
-
- # send 16 bytes:
- # 1-2: LE short: requested events (btn down = 0x0004)
- # 3-4: LE short: event passed through (~GPM_HARD=0xFEFF)
- # 5-6: LE short: min modifiers
- # 7-8: LE short: max modifiers
- # 9-12: LE int: pid
- # 13-16: LE int: virtual console number
-
- print -u$ZSH_GPM_FD -n "\4\0\377\376\\$(([##8]min&255
- ))\\$(([##8]min>>8))\\$(([##8]max&255))\\$(([##8]max>>8
- ))\\$(([##8]$$&255))\\$(([##8]$$>>8&255))\\$((
- [##8]$$>>16&255))\\$(( [##8]$$>>24))\\$((
- [##8]${TTY#/dev/tty}))\0\0\0"
- zle -F $ZSH_GPM_FD handle-gpm-mouse-event
- else
- zle-error 'Error: unable to connect to GPM'
- ZLE_USE_MOUSE=
- fi
- fi
- else
- # ZLE_USE_MOUSE disabled, close GPM connection
- if (( $+ZSH_GPM_FD )); then
- eval "exec $ZSH_GPM_FD>&-"
- # what if $ZSH_GPM_FD > 9 ?
- zle -F $ZSH_GPM_FD # remove the handler
- unset ZSH_GPM_FD
- fi
- fi
- }
-
- handle-gpm-mouse-event() {
- local last_status=$?
- local event i
- if read -u$1 -k28 event; then
- local buttons x y
- (( buttons = ##$event[1] ))
- (( x = ##$event[9] + ##$event[10] << 8 ))
- (( y = ##$event[11] + ##$event[12] << 8 ))
- handle-mouse-event $(( (5 - (buttons & -buttons)) / 2 )) $x $y $last_status
- zle -R # redraw buffer
- else
- zle -M 'Error: connection to GPM lost'
- ZLE_USE_MOUSE=
- zle-update-mouse-driver
- fi
- }
- fi
- else
- # xterm-like mouse support
- zmodload -i zsh/parameter # needed for $functions
-
- zle-update-mouse-driver() {
- if [[ -n $WIDGET ]]; then
- if [[ -n $ZLE_USE_MOUSE ]]; then
- print -n '\e[?1000h'
- else
- print -n '\e[?1000l'
- fi
- fi
- }
-
- if [[ $functions[precmd] != *ZLE_USE_MOUSE* ]]; then
- functions[precmd]+='
- [[ -n $ZLE_USE_MOUSE ]] && print -n '\''\e[?1000h'\'
- fi
- if [[ $functions[preexec] != *ZLE_USE_MOUSE* ]]; then
- functions[preexec]+='
- [[ -n $ZLE_USE_MOUSE ]] && print -n '\''\e[?1000l'\'
- fi
-
- bindkey -M emacs '\e[M' handle-xterm-mouse-event
- bindkey -M viins '\e[M' handle-xterm-mouse-event
- bindkey -M vicmd '\e[M' handle-xterm-mouse-event
-
- if [[ $TERM = *Eterm* ]]; then
- # Eterm sends \e[5Mxxxxx on drag events, be want to discard them
- discard-mouse-drag() {
- local junk
- read -k5 junk
- }
- zle -N discard-mouse-drag
- bindkey -M emacs '\e[5M' discard-mouse-drag
- bindkey -M viins '\e[5M' discard-mouse-drag
- bindkey -M vicmd '\e[5M' discard-mouse-drag
- fi
- fi
-
-fi
-
-zle-toggle-mouse() {
- # If no prefix, toggle state.
- # If positive prefix, turn on.
- # If zero or negative prefix, turn off.
-
- # Allow this to be used as a normal function, too.
- if [[ -n $1 ]]; then
- local PREFIX=$1
- fi
- if (( $+PREFIX )); then
- if (( PREFIX > 0 )); then
- ZLE_USE_MOUSE=1
- else
- ZLE_USE_MOUSE=
- fi
- else
- if [[ -n $ZLE_USE_MOUSE ]]; then
- ZLE_USE_MOUSE=
- else
- ZLE_USE_MOUSE=1
- fi
- fi
- zle-update-mouse-driver
-}
-zle -N zle-toggle-mouse
+++ /dev/null
-# $Id: .zlogin,v 1.1 2004/06/10 09:59:46 dope Exp dope $
-#
-# .zlogin is sourced in login shells. It should contain commands that
-# should be executed only in login shells. It should be used to run a
-# series of external commands (fortune, msgs, etc).
-#
-# Check incoming ftp files.
-if [[ $(uname -n) = painless ]]
-then
- INCOMING=/home/ftp/pub/incoming
- if [[ -d ${INCOMING} ]]
- then
- pushd ${INCOMING}
- newfiles=( )
- [[ -a .timestamp ]] || touch .timestamp
- setopt nullglob
- for file in ^.timestamp
- [[ $file -nt .timestamp ]] && newfiles=( $newfiles $file )
- if [[ -n $newfiles ]]
- then
- echo "New files in ${INCOMING}:"
- echo " "$newfiles
- echo ""
- fi
- touch .timestamp
- popd
- fi
- fi
-
-# Check for TODO-entry
-if [[ -e ~/TODO ]]
-then
- echo "Note: New TODO - entry!"
- echo
- cat ~/TODO
- echo
-fi
+++ /dev/null
-# $Id: .zlogout,v 1.1 2004/06/10 10:01:29 dope Exp dope $
-#
-# .zlogin is sourced in login shells. It should contain commands that
-# should be executed only in login shells. It should be used to run a
-# series of external commands (fortune, msgs, etc).
-
-FORTUNE="/usr/games/fortune"
-FORTUNE_OPTS="-s"
-COWSAY="/usr/local/bin/cowsay"
-
-# Only reset and clear if it's at the physical console.
-if [ ! $DISPLAY ]; then
- if [ ! $SSH_CLIENT ]; then
- reset
- fi
-fi
-
-# Clear the screen so next person can't see anything from the session.
-clear
-
-# Only for a normal user in the console, make the cow say a fortune *g*
-if [ "$UID" != 0 ] && [ ! "${DISPLAY}" ]; then
- if [ -x ${COWSAY} ]; then
- if [ -x ${FORTUNE} ]; then
- ${FORTUNE} ${FORTUNE_OPTS} | ${COWSAY} -nW80; echo
- fi
- elif [ -x ${FORTUNE} ]; then
- ${FORTUNE} ${FORTUNE_OPTS}; echo
- fi
-fi
+++ /dev/null
-# *I* *HATE* *OpenGL*!!!11!
- alias gl="gcc -L/usr/X11R6/lib -L/usr/X11/lib -lglut -lGL -lGLU -lXi -lXmu -lXt -lXext -lSM -lm -lX11"
- alias ogl="g++ -L/usr/X11R6/lib -lglut -lGLU -lGL -lXi -lXmu"
-# needed for some sources from CVS
- alias autofuck='aclocal && autoheader && libtoolize --copy --automake && automake --copy --add-missing && autoconf'
-# See <http://strcat.neessen.net/hacks/rand-useragent.pl> ;-)
- if [ -x ~/bin/rand-useragent.pl ] && [ -x $(which w3m) ]; then
- alias w3m='w3m -o user_agent="`rand-useragent.pl`" $1'
- fi
-# Edit my sigquotes ;-)
- alias esig="$EDITOR ~/.sigs/own-stuff"
-# I like this player ;-)
- if [ -x $(which mp3blaster) ]; then
- alias mp3blaster="mp3blaster -a .xmms/xmms.m3u -f .now_playing"
- fi
-# Quick edit often used setup file
- alias z='$EDITOR ~/.zshrc'
- alias s='$EDITOR ~/.slrnrc'
- alias v='$EDITOR ~/.vimrc'
-# history mechanism
- alias h='history'
-# VIM related aliases ;o) btw. ``$SHELL:t'' is a modifiers from the Z
-# Shell. In other shells you can use ``${SHELL##*/}'' instead. Valid
-# Modifiers can be found in ``info -f zsh -n Modifiers''.
- alias :w='echo "Dude.. thats $SHELL:t and *not* VI(M)!"'
- alias :q='echo "Dude.. thats $SHELL:t and *not* VI(M)!"'
- alias :wq='echo "Dude.. thats $SHELL:t and *not* VI(M)!"'
- alias vi="${EDITOR}"
- alias view="${EDITOR} -R"
- alias ex="${EDITOR} -e"
- alias pltags="${VIMRUNTIME}/tools/pltags.pl"
-
-# highlight the current day in ``cal''
- alias _cal='var=$(cal); echo "${var/$(date +%-d)/$(echo -e "\033[1;31m$(date +%-d)\033[0m")}"'
-
-# quick&dirty mirror
- alias mirror="noglob wget --mirror --no-parent --convert-links --recursive --timestamping --continue$1"
-
-# access the database of ${HOME} (Note: This is for *OpenBSD*! Not for
-# Linux!
- if [ "${OS}" = openbsd ]; then
- alias hupdatedb="updatedb --searchpaths="$HOME" --prunepaths="/" --fcodes=$HOME/.locatedb"
- alias hlocate="locate -d ${HOME}/.locatedb"
- else
- # That's for Linux (strictly speaking slocate under Slackware).
- # See <http://www.geekreview.org/slocate/> for details.
- if [ "${OS}" = linux-gnu ] && [ -x $(which slocate) ]; then
- alias hupdatedb="updatedb -U ${HOME} --output=${HOME}/.locatedb -e /home/dope/tmp,/home/dope/MuttMail,/home/dope/.cpan"
- alias hlocate="slocate --database=${HOME}/.locatedb $1"
- else
- # That's for GNU updatedb
- alias hupdatedb="updatedb --localpaths="$HOME" --output=$HOME/.locatedb --prunefs="/""
- alias hlocate="locate -d ${HOME}/.locatedb"
- fi
- fi
-
-# some stuff for gentoo (i compelled to use it sometimes *narf*)
- if [ -e "/etc/gentoo-release" ]; then
- alias emerge="sudo emerge"
- alias eupdatedb="sudo eupdatedb"
- alias etc-update="sudo /usr/sbin/etc-update"
- alias env-update="sudo /usr/sbin/env-update"
- fi
-# See <http://www.swaret.org/> and <http://software.jaos.org> for details
- if [ -e "/etc/slackware-version" ]; then
- alias slapt-get="sudo slapt-get"
- alias swaret="sudo swaret"
- alias installpkg="sudo /sbin/installpkg"
- alias upgradepkg="sudo /sbin/upgradepkg"
- alias removepkg="sudo /sbin/removepkg"
- alias pkgtool="sudo /sbin/pkgtool"
- alias makepkg="sudo /sbin/makepkg"
- fi
-
-# settings for NetBSD
- if [[ "${OSTYPE}" == netbsd* ]]; then
- export CVSROOT=":pserver:anoncvs@anoncvs.NetBSD.org:/cvsroot"
- alias upsrc="cvs -d $CVSROOT update -PAd src"
- alias uppkgsrc="cvs -d $CVSROOT update -PAd pkgsrc"
- fi
-# setting for OpenBSD
- if [[ "{$OSTYPE}" == openbsd* ]]; then
- export CVSROOT='anoncvs@anoncvs1.usa.openbsd.org:/cvs'
- alias pkg_add='sudo pkg_add'
- alias pkg_delete='sudo pkg_delete'
- alias upsrc="cd /usr/src && cvs -q up -Pd"
- alias upports="cd /usr && cvs -q get -P ports"
- fi
-# takes snapshot from /dev/ttyN
- alias snapscreenshot="sudo snapscreenshot"
- alias mkscreeny="cd ~/shots/ ; sleep 5; snapscreenshot -c1 -x1 > snap.tga ; convert snap.tga snap.png"
-
-# grep wrapper with search highlighting (<http://www.acme.com/software/hgrep/>)
-# Only for non-linux systems needed (see below)
- if [ ! "${OSTYPE}" = linux-gnu ] && [ -x $(which hgrep) ]; then
- alias grep='hgrep'
- else
- # fi
- # FIXME: ``${(MS)$(grep --version 2>/dev/null)#GNU}'' shows me ``GNU''
- # and export the variables correctly. But why (BY ZEUS FAT ASS)
- # become ``GREP_{COLOR,OPTIONS}'' exported if the string ``GNU''
- # unavailable?
- # Note: ``--color'' is a feature from GNU grep >=2.5 and i do *not*
- # check for the available version, but only for ``GNU''!
- if [ ${OS} = "linux-gnu" -n ${(MS)$(grep --version 2>/dev/null)#GNU} ]; then
- export GREP_COLOR='0;31'
- export GREP_OPTIONS='--color=auto'
- alias hgrep='grep $GREP_OPTIONS $*'
- fi
- fi
-
-# ``choad'' is a small perlscript to ripp audio-cds
- if [ -x $(which choad) ]; then
- alias choad="sudo choad"
- fi
-# VimTip 121: Using vim as a syntax-highlighting pager
-# <http://vim.sourceforge.net/tip_view.php?tip_id=>
- if [ -e ~/.vimrc.more ] && [ -x $(which vim) ]; then
- alias vmore='vim -u ~/.vimrc.more'
- fi
-# I use ``gls'' instead of ls because the standard 'ls' from OpenBSD
-# doesn't not support colors :/ GNU ls is part of fileutils-4.1 and
-# component of the portcollection ($PORTSDIR/misc/fileutils)
-# [[ ${OS} = "linux" && -n ${(MS)$(ls --version 2>/dev/null)#GNU} ]] && ls_flags="--color"
-# (ls --help 2>/dev/null |grep -- --color=) >/dev/null && alias ls='ls -b -CF --color=auto'
- if [ -x $(which gls) ]; then
- alias ls='gls --color=always'
- elif
- [ ${OS} = "linux-gnu" -n ${(MS)$(ls --version 2>/dev/null)#GNU} ];
- then
- export TIMESTYLE=$'--time-style="+\e[1;37m[\e[1;35m%D %H:%M\e[1;37m]\e[0m"'
- alias ls="ls -b -CF --color=always ${TIMESTYLE}"
- else
- alias ls='ls -F'
- fi
-# call mailfilter and start getmail after a positive return value
-# <http://mailfilter.sourceforge.net/> && <http://www.qcc.ca/~charlesc/software/getmail-3.0/>
- alias gmail='mailfilter -r || getmail -v --rcfile ~/.getmail/getmailrc --rcfile ~/.getmail/getmail-hardening'
-# X11? Yes! A open port? Nope!
-# alias sx='startx -- -nolisten tcp 2>&1 ~/.startx-errors'
-# alias sx='startx -- -nolisten tcp >& $HOME/.startx-errors'
- alias sx='startx -- -deferglyphs 16 -dpi 100 -nolisten tcp >& $HOME/.startx-errors'
-# SSH to some hosts :>
- alias router="ssh dope@192.168.13.2"
- alias hellfire="ssh dope@192.168.13.3"
- alias dreckskind="ssh dope@192.168.13.4"
- alias firewall="ssh bofh@192.168.13.5"
- alias blitzkrieg="ssh dope@192.168.13.6"
- alias diehard="ssh lart@192.168.13.7"
-# "-" is the same as the -l option (deprecated).
- alias su="su -"
-# format a floppy (OpenBSD)
- alias format="fdformat /dev/rfc0a"
-# Quick chmod ;-)
- alias rw-='chmod 600'
- alias rwx='chmod 700'
- alias r--='chmod 644'
- alias r-x='chmod 755'
-# stolen from a ~/.bashrc (IIRC RedHat(?))
- alias ..='cd ..'
- alias ...='cd ../..'
- alias ....="cd ../../.."
-# Make/Create/Convert Pics/Thumbnails
- alias _GIF='convert -verbose -interlace LINE'
- alias _thumb='convert -geometry 100x100 -interlace LINE -verbose'
- alias _thumb150='convert -geometry 150x150 -interlace LINE -verbose'
- alias _thumb200='convert -geometry 200x200 -interlace LINE -verbose'
-# Use colors, do not check for new groups, specific my killfile an use
-# spool (needed for slrnpull)
- alias news='slrn -C -n --kill-log /home/dope/.slang/KILL --spool'
- alias gnews='slrnpull -d /home/dope/nslrn/slrnpull -h news.individual.net'
-# start mutt/vim/zsh/jed without any setup
- alias null-mutt='mutt -n -f /dev/null -F /dev/null'
- alias null-zsh='zsh -f'
- alias null-vim='vim -u NONE'
- alias null-jed='jed -n'
-# *Very* often used!
- alias lsd='ls -ld *(/)' # only show directories
- alias lad='ls -ld .*(/)' # only show dot-directories
- alias lsa='ls -a .*(.)' # only show dot-files
- alias lsbig='ls -lSh *(.) | head' # display the biggest files
- alias lssmall='ls -Sl *(.) | tail' # display the smallest files
- alias lsnew='ls -rtl *(.) | tail' # display the newest files
- alias lsold='ls -rtl *(.) | head' # display the oldest files
-# check out/in RCS revisions
- alias lci='ci -l'
- alias lco='co -zLT'
-# convert from UPPER to lower (or back)
- alias UP2low='for i in *(.); mv $i ${i:l}'
- alias low2UP='for i in *(.); mv $i ${i:u}'
-# ctags are *very* useful!
- alias mktags='for i in **/*(/); do (cd $i; eval '\''ctags-exuberant *'\''); done; ctags-exuberant --file-scope=no -R'
-# Make the source to be with you!!!11!
- alias C='./configure'
- alias CH='./configure --help | $PAGER'
-# zmv -- see ``less ${^fpath}/zmv(N)'' for more details.
- alias zcp='zmv -C'
- alias zln='zmv -L'
-# r00t commands
- if [ -x =sudo ]; then
- alias ifconfig="sudo ifconfig"
- alias shutdown="sudo shutdown"
- alias tcpdump="sudo tcpdump"
- alias nmap="sudo nmap"
- fi
-# simple replacement for nmap (anywise .. :>)
- alias pscan="nc -vz $1 1-1024"
-# Yup. I mount my CDROM manually!
- if [ "${OS}" = openbsd ]; then
- alias _mcd='sudo mount /dev/cd0a /mnt && cd /mnt && ls'
- alias _ucd='cd ~ && sudo umount /mnt'
- else
- alias _mcd='sudo mount /mnt/cdrom && cd /mnt/cdrom && ls'
- alias _ucd='cd ~ && sudo umount /mnt/cdrom'
- fi
-# Yup. i use Gnus.. sometimes..
-if [ -x /usr/bin/emacs-21.3-with-x11 ]; then
- alias emacs='emacs -nw -f server-start'
- alias gnus='emacs -f gnus'
- alias emacsnox='/usr/bin/emacs -nw'
-fi
-
-# GPG *sigh*
- alias get.pgpkey='gpg --keyserver pgp.mit.edu --recv-key 0x"$@"'
- alias mail.gpgkey='mail -s "GET keyid $@" pgp-public-keys@keys.pgp.net'
- alias encrypt.gpg='echo "WARNING: plaintext is not deleted!"; gpg --quiet -ear 0x47E322CE'
- alias sign.gpg='gpg --sign $*'
-# internet radio
- alias p5='http://64.236.34.97:5190/stream/1006'
- alias p4='mpg123 http://linux10.cs.uaf.edu:8000/kuac24mono'
- alias p3='mpg123 -b 1024 http://radio.hiof.no:8000/nrk-petre-128'
- alias p2='mpg123 -b 1024 http://radio.hiof.no:8000/nrk-p2-128'
- alias p1='mpg123 -b 1024 http://radio.hiof.no:8000/nrk-p1-128'
- alias relax='mpg123 -b 1024 http://radio.hiof.no:8000/nrk-alltid-klassisk-128'
- alias mpetre='mpg123 -b 1024 http://radio.hiof.no:8000/nrk-mpetre-128'
- alias c64='xmms http://radio.c64.org:8000/ &'
- alias classical='xmms http://64.236.34.97:5190/stream/1006 &'
-# Some aliases for the OpenBSD - Portcollection
- if [ "${OS}" = openbsd ]; then
- alias Svar='make show=FLAVORS'
- alias Spversion='make show=VERSION'
- alias Scomm='make show=COMMENT'
- alias Swth='make show=DESCRIPTION'
- fi
-# Ask stupid questions? In Boards/NGs? Yeah .. sure "Killing time.. the
-# end of .." --Metallica :>
-# I read this fuckings manuals *very* often *narf*
- alias H-Slrn='less /backups/Documentations/Manuals/slrn-manual.txt'
- alias H-Mutt='less /backups/Documentations/Manuals/mutt-manual.txt'
- alias H-Irssi='less /backups/Documentations/Manuals/irssi-manual.txt'
- alias H-Getmail='less /backups/Documentations/Manuals/getmail-manual.txt'
-# The Open Group Base Specifications Issue 6 (IEEE Std 1003.1, 2003
-# Edition)
- alias H-Susv3='${BROWSER:-lynx} /backups/Documentations/susv3/index.html'
-# YES! Zsh _is_ evil :>
- alias H-Zsh='${BROWSER:-lynx} /backups/Documentations/Zsh/Doc/zsh_toc.html'
- alias H-ZshGuide='${BROWSER:-lynx} /backups/Documentations/Zsh/guide/zshguide.html'
- alias H-ZshFAQ='${BROWSER:-lynx} /backups/Documentations/Zsh/guide/faqs.orgfaqsunix-faqshellzsh.html'
-# The Linuxfibel (German). See <http://www.fibel.org/> for details.
- alias H-Linux='${BROWSER:-lynx} /backups/Documentations/Linux/linux/index.html'
-# Yup. I'm fucking lazy :>
- alias H-OpenBSD='${BROWSER:-lynx} /backups/Documentations/OpenBSD/index.html'
- alias H-FreeBSD='${BROWSER:-lynx} /backups/Documentations/FreeBSD/index.html'
- alias H-NetBSD='${BROWSER:-lynx} /backups/Documentations/NetBSD/index.html'
-# de.comp.os.unix.linux - FAQ
- alias H-Dcoul='${BROWSER:-lynx} /backups/Documentations/dcoul/html/index.html'
-# The editor of my choice! The one and only! J-E-H-O-V-A!!!11!
- alias H-Vim='${BROWSER:-lynx} /backups/Documentations/Vim/usr_toc.html'
-# THE SED FAQ (<http://sed.sourceforge.net/sedfaq.html>)
- alias H-Sed="${BROWSER:-lynx} /backups/Documentations/Sed/sedfaq.html"
-# HTML .. *sigh*
- alias H-HTML='${BROWSER:-lynx} /backups/Documentations/Self-HTML/index.htm'
-# The Jargon File (version 4.4.7)
- alias H-Jargon='${BROWSER:-lynx} /backups/Documentations/Jargon/html/index.html'
-# CSS .. Fuck me gently with a chainsaw
- alias H-CSS='${BROWSER:-lynx} /backups/Documentations/CSS/index.html'
-# Fucking FHS *gnarf*
- alias H-FHS='${BROWSER:-lynx} /backups/Documentations/Linux/fhs-2.3.html'
-# Extensible Markup Language
- alias H-XML='${BROWSER:-lynx} /backups/Documentations/XML/index.html'
-# German Manpages.
-# -<http://www.ibiblio.org/pub/Linux/docs/LDP/man-pages/manpages-de-0.4.tar.gz>
- alias de-man="man -M /backups/Documentations/manpages.de '$1'"
-# fucking devices *narf*
- if [ "${OS}" = linux-gnu ]; then
- alias H-Devices='${PAGER:-less} /usr/src/linux/Documentation/devices.txt'
- fi
-# See http://svnbook.red-bean.com/
- alias H-Svn="{BROWSER:-lynx} /backups/Documentations/svnbook-1.1/index.html"
-# RFC-Index. Not really needed. See <http://strcat.neessen.net/hacks/rfc.zsh>
-# for details.
- # alias H-RFC='${BROWSER:-lynx} /backups/Documentations/RFCs/rfc-index.txt.gz'
-# Xterm specific stuff
- alias mxterm-default='echo -e "\033]50;fixed\007"'
- alias mxterm-normal=default
- alias mxterm-hide='echo -en "\033]50;nil2\007"'
- alias mxterm-tiny='echo -en "\033]50;5x7\007"'
- alias mxterm-small='echo -en "\033]50;6x10\007"'
- alias mxterm-medium='echo -en "\033]50;7x13\007"'
- alias mxterm-large='echo -en "\033]50;9x15\007"'
- alias mxterm-huge='echo -en "\033]50;10x20\007"'
- if [ "$TERM" = "xterm" ] && [ "$LINES" -ge 50 ] && [ "$COLUMNS" -ge 100 ]; then
- mxterm-large
- fi
-# Postscript, LaTeX and printing
- alias pnm2ps='pnmtops -width 8.26 -height 11.69'
- alias gif2ps='(giftopnm | pnm2ps)'
- alias jpeg2ps='(djpeg | pnm2ps)'
- alias png2ps='(pngtopnm | pnm2ps)'
- alias ps2psbook="(psbook | psnup -2 | tumble)"
- alias ps2A5-haefte="(psbook -s8 | psnup -4 )"
- alias sho='xdvi -s 2 -expert -geometry 1010x900+30+1030'
- alias _dvishow='xdvi -s 3 -expert -geometry 990x990'
-# Change keyboard mapping on the fly (nice for programming)
- if [ -x $(which xmodmap) ]; then
- alias US-e="xmodmap ~/.keys-emacs-us; xmodmap -e 'keysym Alt_L = Meta_L Alt_L'"
- alias US-v="xmodmap ~/.keys-vi-us; xmodmap -e 'keysym Alt_L = Meta_L Alt_L'"
- alias US="xmodmap ~/.keys-vi-us; xmodmap -e 'keysym Alt_L = Meta_L Alt_L'"
- fi
-# some global aliases for redirection
- alias -g N="&>/dev/null"
- alias -g 1N="1>/dev/null"
- alias -g 2N="2>/dev/null"
- alias -g DN="/dev/null"
- alias -g PI="|"
-# suffix aliases (needs Zsh >= 4.2.0). Suffix aliases allow the shell
-# to run a command on a file by suffix, e.g 'alias -s ps=gv' makes
-# 'foo.ps' execute 'gv foo.ps'.
-if [[ $ZSH_VERSION == 4.2.<0->* ]]; then
- alias -s dvi=xdvi
- alias -s pdf=xpdf
- alias -s ps=gv
- alias -s ogg=ogg123
- alias -s wmv=mplayer
- alias -s mp3=mplayer
- alias -s html=${BROWSER:-lynx}
- alias -s htm=${BROWSER:-lynx}
- alias -s tex=${EDITOR:-vi}
- alias -s txt=${PAGER:-less}
- alias -s jpg=display
- alias -s jpeg=display
- alias -s xpm=display
- alias -s xbm=display
- alias -s png=display
- alias -s gif=display
- alias -s gz=show-archive
- alias -s tar=show-archive
- alias -s bz2=show-archive
- alias -s zip=show-archive
-fi
+++ /dev/null
-# To find out the keynames you can use
-# | cat > /dev/null
-# or
-# | od -c
-#
-# Some useful keybindings
-# | $ xterm -version
-# | XFree86 4.3/OpenBSD 3.3(174)
-# | $ echo $TERM
-# | xterm
-#
-# bindkey "^Y" yank # <STRG>-Y
-# bindkey "\e[3~" delete-char # Delete
-# bindkey '^[[7~' beginning-of-line # Home (xterm)
-# bindkey '^[[8~' end-of-line # End (xterm)
-# bindkey '^[[5~' history-beginning-search-backward # Page Up
-# bindkey '^[[6~' history-beginning-search-forward # Page Down
-# bindkey '^[[2~' overwrite-mode # Insert
-# bindkey "^[[A" up-line-or-search # <ESC>-N
-# bindkey "^[[B" down-line-or-search # <ESC>-
-# bindkey "^Q" edit-command-line # <STRG>-Q
-# bindkey " " magic-space # ' ' (Space>
-# bindkey "^B" backward-word # <STRG>-B
-# bindkey "^E" expand-cmd-path # <STRG>-E
-# bindkey "^N" forward-word # <STRG>-N
-# bindkey "^R" history-incremental-search-backward # <STRG>-R
-# bindkey "^P" quote-line # <STRG>-P
-# bindkey "^K" run-help # <STRG>-K
-# bindkey "^Z" which-command # <STRG>-Z
-# bindkey "^X" what-cursor-position # <STRG>-X
-# bindkey -v
-
-case $TERM in
- xterm*)
- # Pos1 && End
- bindkey "^[[H" beginning-of-line
- bindkey "^[[F" end-of-line
- ;;
- screen*)
- bindkey "^[[1~" beginning-of-line
- bindkey "^[[4~" end-of-line
- ;;
- linux*)
- bindkey "^[[1~" beginning-of-line
- bindkey "^[[4~" end-of-line
- ;;
- rxvt*)
- bindkey "^[[1~" beginning-of-line
- bindkey "^[[4~" end-of-line
- ;;
- Eterm*)
- bindkey "^[[7~" beginning-of-line
- bindkey "^[[8~" end-of-line
- ;;
-esac
- bindkey "^[[2~" yank # Einfg
- bindkey "^[[5~" up-line-or-history # PageUp
- bindkey "^[[6~" down-line-or-history # PageDown
- bindkey "^[e" expand-cmd-path # C-e for expanding path of typed command
- bindkey "^[[A" up-line-or-search # up arrow for back-history-search
- bindkey "^[[B" down-line-or-search # down arrow for fwd-history-search
- bindkey " " magic-space # do history expansion on space
- bindkey -v # vi keybindings
- bindkey "\e[3~" delete-char # "Entf" or "Del"
- bindkey "^[[A" history-search-backward # PgUp
- bindkey "\e[B" history-search-forward # PgDown
- bindkey "\e[C" forward-char # ->
- bindkey "\e[D" backward-char # <-
- bindkey "\eq" push-line # Kill the *complete* line! (ESC+q)
- bindkey "^R" history-incremental-search-backward # Search in my $HISTFILE (STRG+R)
- bindkey "^[[2;5~" insert-last-word # STRG+Einfg
- bindkey "\ea" accept-and-hold # ESC+a
- bindkey "^B" backward-word # One word back
- bindkey "^N" forward-word # One word forward
- bindkey "^P" quote-line # quote the whole line
- bindkey "^K" run-help # i. e. "run-help foo" == "man foo"
- bindkey -s "\C-t" "dirs -v\rcd ~" # STRG+t
- bindkey "^I" expand-or-complete # assimilable to "ls<TAB>"
- bindkey "^E" expand-cmd-path # $ ls<STRG+E> == /bin/ls
- bindkey "^X" which-command # <STRG>+Z == which foo
- bindkey " " my-expand-abbrev # See ~/.zsh/zshmisc "/^myiabs" for details
- #--------------------------------------------------
- # # VI-like ;-)
- # bindkey -M vicmd "^R" redo
- # bindkey -M vicmd "u" undo
- # bindkey -M vicmd "ga" what-cursor-position
- # bindkey -M viins "\e^R" redisplay
- # bindkey -M vicmd "^R" redisplay2
- # bindkey "^L" clear-screen
- # bindkey -M vicmd "A" vi-add-eol
- # bindkey -M vicmd "a" vi-add-next
- # bindkey "^Xl" screenclearx
- # bindkey -M vicmd "c" vi-change
- # bindkey -M vicmd "C" vi-change-eol
- # bindkey -M vicmd "S" vi-change-whole-line
- # bindkey -M vicmd "i" vi-insert
- # bindkey -M vicmd "I" vi-insert-bol
- # bindkey -M vicmd "O" vi-open-line-above
- # bindkey -M vicmd "o" vi-open-line-below
- # bindkey -M vicmd "s" vi-substitute
- # bindkey -M vicmd "R" vi-replace
- # bindkey -M viins "\e" vi-cmd-mode
- # bindkey -M vicmd "g~" vi-oper-swap-case
- #--------------------------------------------------
-#;;
-#esac
+++ /dev/null
-# Tab host completion for programs
-compctl -k ping telnet ncftp host nslookup irssi rlogin ftp
-
-# Make completion (yeah im getting fucking lazy)
-compile=(install clean remove uninstall deinstall)
-compctl -k compile make
-
-# some (useful) completions
- compctl -j -P '%' fg jobs disown
- compctl -g '*.(gz|z|Z|t[agp]z|tarZ|tz)' + -g '*(-/)' gunzip gzcat zcat
- compctl -g '*.tar.Z *.tar.gz *.tgz *.zip *.ZIP *.tar.bz2 *.tar' + -g '*' show-archive simple-extract
- compctl -g '*.(mp3|MP3|ogg|OGG|temp|TEMP)' + -g '*(-/)' mpg123 xmms
- compctl -g "*.html *.htm" + -g "*(-/) .*(-/)" + -H 0 '' w3m lynx links wget opera
- compctl -g '*.(pdf|PDF)' + -g '*(-/)' xpdf
- compctl -g '*(-/)' + -g '.*(/)' cd chdir dirs pushd rmdir dircmp cl tree
- compctl -g '*.(jpg|JPG|jpeg|JPEG|gif|GIF|png|PNG|bmp)' + -g '*(-/)' gimp xv pornview
- compctl -g '*.(e|E|)(ps|PS)' + -g '*(-/)' gs ghostview nup psps pstops psmulti psnup psselect gv
- compctl -g '*.tex*' + -g '*(-/)' {,la,gla,ams{la,},{g,}sli}tex texi2dvi
- compctl -g '*.dvi' + -g '*(-/)' dvips
- compctl -g '/var/db/pkg/*(/:t)' pkg_delete pkg_info
- compctl -g '[^.]*(-/) *.(c|C|cc|c++|cxx|cpp)' + -f cc CC c++ gcc g++
- compctl -g '[^.]*(-/) *(*)' + -f strip ldd gdb
- compctl -s '$(<~/.vim/tags)' vimhelp
- compctl -s '/var/log/packages/*(.:t:r)' slapt-get
-
-# 'compctl' with regex
- # kill takes signal names as the first argument after -, but job names after %
- compctl -j -P % -x 's[-] p[1]' -k signals -- kill
- # gzip files, but gzip -d only gzipped or compressed files
- compctl -x 'R[-*[dt],^*]' -g '*.(gz|z|Z|t[agp]z|tarZ|tz)(D)' + -g '*(-/D)' + -f - 's[]' -g '^*(.(tz|gz|t[agp]z|tarZ|zip|ZIP|jpg|JPG|gif|GIF|[zZ])|[~#])' + -f -- gzip
- # read '/etc/shells' to complete 'chsh -s'
- compctl -u -x 'c[-1,-s]' -s '$(</etc/shells)' -- chsh
- # For rcs users, co and rlog from the RCS directory. We don't want to see
- # the RCS and ,v though.
- compctl -g 'RCS/*(D:s@RCS/@@:s/,v//)' + -g '*(-/D)' co rlog rcs{,diff,merge} revdiff logs mymerge cil
- # Argument to finger and talk is username@hostname
- compctl -x 'N[-1,@]' -k hosts - 's[]' -u -S '' -- finger talk
- # Fnord!
- compctl -f -x \
- 'p[1]' -k '(cvf czvf cjvf tvf tzvf tjvf xvf xzvf xjvf)' \
- - 'p[2] W[1,*z*f*],p[2] W[1,*f*z*]' -g '[^.]*(-/) *.(tar.(gz|z|Z)|taz|tgz)' \
- - 'p[2] W[1,*I*f*],p[2] W[1,*f*I*]' -g '[^.]*(-/) *.tar.bz2' \
- - 'p[2] W[1,*f*]' -g '[^.]*(-/) *.tar' + -f -- tar
-# security by.. by.. *aehm* .. me? *g*
-compctl -k '(asn1parse ca ciphers crl crl2pkcs7 dgst dh dhparam dsa dsaparam \
- enc errstr gendh gendsa genrsa nseq passwd pkcs12 pkcs7 pkcs8 \
- rand req rsa rsautl s_client s_server s_time sess_id smime speed \
- spkac verify version x509)' openssl
-# Don't complete uninteresting users
-zstyle ':completion:*:*:*:users' ignored-patterns \
- _fingerd _kadmin _rstatd _syslogd daemon nobody proxy sshd \
- _identd _kdc _rusersd _x11 operator root uucp _isakmpd _portmap \
- _spamd named popa3d smmsp
-
-# ... unless we really want to.
-zstyle '*' single-ignored show
-
-# fucking duplicate entries in my $HISTFILE *narf*
-zstyle ':completion:*:history-words' stop yes
-zstyle ':completion:*:history-words' remove-all-dups yes
-zstyle ':completion:*:history-words' list false
-zstyle ':completion:*:history-words' menu yes
-
-# completion for "man" by Gossamer <gossamer@tertius.net.au> 980827
-# This is damn funky. I'm going to do something similar for pinfo,
-# hopefully.
-#--------------------------------------------------
-compctl -f -x 'S[1][2][3][4][5][6][7][8][9]' -k '(1 2 3 4 5 6 7 8 9)' \
- - 'R[[1-9nlo]|[1-9](|[a-z]),^*]' -K 'match-man' \
- - 's[-M],c[-1,-M]' -g '*(-/)' \
- - 's[-P],c[-1,-P]' -c \
- - 's[-S],s[-1,-S]' -k '( )' \
- - 's[-]' -k '(a d f h k t M P)' \
- - 'p[1,-1]' -c + -K 'match-man' \
- -- vman pinfo
-#--------------------------------------------------
-# setopt SH_WORD_SPLIT function man_var () {
-# man_pages=( $^manpath/man*/*(N:t:r:r) )
-# compctl -k man_pages man
-# reply=( $man_pages )
-# }
-# compctl -K man_var vman pinfo; man_pages=()
-#--------------------------------------------------
+++ /dev/null
-# *Heavy* under construction! Use it with cautions!
-#
-# 030515 get latest source of slrn via CVS
-# http://sourceforge.net/cvs/?group_id=7768
-function mkslrn()
-{
- cd /backups/Source/slrn && \
- cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ login ; \
- cvs -z3 update ; \
- cd /backups/Source/slrn/ && autopoint -f && aclocal-1.8 && autoconf && \
- autoheader && automake-1.8 --foreign --add-missing && autoconf && \
- patch -p1 < ../patches/slrn-0.9.8.0-useragent-patch ; \
- ./configure --enable-setgid-code --enable-spool --enable-inews \
- --enable-force-inews --with-slrnpull --with-ssl=/usr/bin/openssl \
- --enable-largefile --enable-mime --prefix=/home/dope/dev-bin && \
- =make && mmake && =make install clean
-}
-
-# 030613 get latest source of mutt via CVS
-# notice: CVS-password for mutt-server = "anonymous"
-# http://www.cs.hmc.edu/~me/mutt/
-function mkmutt()
-{
- cd /backups/Source/mutt && \
- cvs -d :pserver:anonymous@cvs.mutt.org:/home/roessler/cvs login ; \
- cvs -z3 update ;\
- ./prepare &&
- patch -p1 < ../patches/patch-1.5.6.rr.compressed ; \
- patch -p1 < ../patches/patch-1.5.6.vvv.initials ;\
- patch -p1 < ../patches/patch-1.5.6.vvv.nntp ;\
- patch -p1 < ../patches/patch-1.5.6.vvv.quote ;\
- patch -p1 < ../patches/patch-1.5.6.vvv.slang ;\
- ./configure --enable-compressed --enable-buffy-size --enable-iconv \
- --enable-imap --enable-nntp --enable-pgp --enable-pop --enable-smime \
- --with-ssl=/usr/sbin/openssl --with-regex --enable-nls --with-exec-shell=/bin/sh \
- --with-nss --prefix=/home/dope/dev-bin && \
- =make && mmake && =make install clean
-}
-
-# 030614 get latest source of vim via CVS
-# http://vim.sourceforge.net/cvsdocs/
-function mkvim()
-{
- cd /backups/Source/vim && \
- cvs -z3 -d:pserver:anonymous@cvs.sf.net:/cvsroot/vim checkout vim ;\
- ./configure --without-x --with-compiledby='Christan Schneider <strcat@gmx.net>' \
- --with-features=huge --prefix=/home/dope/dev-bin && =make && mmake && =make install clean
-}
-
-# 030830 get latest source of dietlibc
-alias getdietlibc="cd /backups/Source/dietlibc/ && (rmdir dietlibc-cvs-`date +%y%m%d` | mkdir dietlibc-cvs-`date +%y%m%d`) && \
- cd dietlibc-cvs-`date +%y%m%d` && \
- cvs -d :pserver:cvs@cvs.fefe.de:/cvs -z9 co dietlibc"
-
-alias zsh-confmake="./configure --enable-pcre --enable-cap --enable-maildir-support \
- --enable-max-jobtable-size=256 --enable-function-subdirs \
- --with-curses-terminfo --enable-dynamic --enable-locale && \
- make && mmake ; sudo make install clean"
-
-# OpenBSD Specific Functions
-if [ "${OS}" = openbsd ]; then
- function mkernel()
- {
- config $1;
- cd ../compile/$1;
- make dep && make;
- }
-
- function src-compile()
- {
- cd /usr/src
- rm -rf /usr/obj
- make obj &&
- make build &&
- mergemaster
- }
-fi
+++ /dev/null
-# (( ${+*} )) = if variable is set don't set it anymore
-# Note: Do *not* use '$PORTSDIR'! This variable is defined in
-# '/path/to/ports/Makefile'.
-(( ${+IRCNAME} )) || export IRCNAME="Christian 'strcat' Schneider" # **EDIT**
-(( ${+IRCNICK} )) || export IRCNICK="strcat" # **EDIT**
-(( ${+IRCSERVER} )) || export IRCSERVER="irc.euirc.net" # **EDIT**
-(( ${+VISUAL} )) || export VISUAL="vim" # **EDIT**
-(( ${+BROWSER} )) || export BROWSER="w3m" # **EDIT**
-(( ${+OS} )) || export OS="${OSTYPE%%[0-9.]*}"
-(( ${+OSVERSION} )) || export OSVERSION="${OSTYPE#$OS}"
-(( ${+OSMAJOR} )) || export OSMAJOR="${OSVERSION%%.*}"
-(( ${+ORGANIZATION} )) || export ORGANIZATION="Guerrilla UNIX Development (Venimus, Vidimus, Dolavimus)" # **EDIT**
-(( ${+SHITDIR} )) || export SHITDIR="/home/$LOGNAME/Trash"
-
-# some variables for specific systems
-case ${OS} in
- openbsd)
- (( ${+CVSROOT} )) || export CVSROOT="anoncvs@anoncvs.ca.OpenBSD.org:/cvs"
- (( ${+PORTS_DIR} )) || export PORTS_DIR="/usr/ports"
- (( ${+PKG_PATH} )) || export PKG_PATH="ftp://ftp.OpenBSD.org/pub/OpenBSD/$(uname -r)/packages/$(uname -m)"
- ;;
- netbsd)
- (( ${+CVSROOT} )) || export CVSROOT="anoncvs@anoncvs.se.NetBSD.org:/cvsroot"
- (( ${+LD_LIBRARY_PATH} )) || export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/X11R6/lib:/usr/local/lib:/usr/pkg/lib"
- (( ${+INCLUDEPATH} )) || export INCLUDEPATH="$INCLUDEPATH:/usr/local/lib"
- (( ${+CFLAGS} )) || export CFLAGS='-I/usr/local/include -I/usr/pkg/include -I/usr/X11R6/include'
- (( ${+CPPFLAGS} )) || export CPPFLAGS=$CFLAGS
- ;;
-esac
-
-# compiler opt. flags !!! use this with caution !!! or dont use et all
-case $CPUTYPE in
- i686)
- (( ${+CFLAGS} )) || export CFLAGS='-O3 -funroll-loops -ffast-math -malign-double -mcpu=pentiumpro -fomit-frame-pointer -fno-exceptions'
- ;;
- i586)
- (( ${+CFLAGS} )) || export CFLAGS='-O3 -mcpu=pentium -ffast-math -funroll-loops -fomit-frame-pointer -fforce-mem -fforce-addr -malign-double -fno-exceptions'
- ;;
- i486)
- (( ${+CFLAGS} )) || export CFLAGS='-O3 -funroll-all-loops -malign-double -mcpu=i486 -march=i486 -fomit-frame-pointer -fno-exceptions'
- ;;
- *)
- (( ${+CXXFLAGS} )) || export CXXFLAGS=$CFLAGS
-esac
-
-# Set the values for some environment variables:
-export HOSTNAME="`hostname`"
-export LESS="-sCieM -P?fFile %f:stdin. ?m(%i of %m) :.line %l ?Lof %L:.?p (%p\%):."
-export LESSBINFMT='*u[%X]'
-export PAGER=less
-export CVS_RSH=ssh
-export NNTPSERVER='news.individual.net' # **EDIT**
-export HELPDIR='~/.zsh/help'
-export VERSION=${VERSION:-"zsh $ZSH_VERSION"}
-export WWW_HOME="http://www.google.com"
-export HTTP_HOME="http://www.google.com"
-export NETHACKOPTIONS='gender:male,noautopickup,color,lit_corridor,showrace,showexp,showdmg,showweight,time,toptenwin,catname:Prowl,msg_window:f,!legacy'
-export INFOPATH="/usr/local/info/:/usr/share/info/:/usr/local/emul/redhat/:/usr/share/info/"
-export MANWIDTH=80
-
-if [ -x $(which lesspipe.sh) ]; then
- export LESSOPEN="|lesspipe.sh %s"
-fi
-
-# i primarily use Vim (GNU Emacs and jed are only exception ;-))
-# $ print ${${$(=vim --version)[5]}:gs/.//}
-# is equivalent to
-# $ /path/to/vim --version | head -n 1 | awk '{print $5}' | sed 's/\.//'
-if [ -x $(which vim) ]; then
- export EDITOR=vim
- export VISUAL="${EDITOR}"
- export VIMRELEASE="`print ${${$(vim --version)[5]}:gs/.//}`"
-else
- if [ -x $(which vi) ]; then
- export EDITOR=vi
- fi
-fi
-
-case ${OS} in
- openbsd)
- [ -d "/usr/local/share/vim/vim$VIMRELEASE" ] \
- && export VIMRUNTIME="/usr/local/share/vim/vim$VIMRELEASE"
- ;;
- netbsd)
- [ -d "/usr/pkg/share/vim/vim$VIMRELEASE" ] \
- && export VIMRUNTIME="/usr/pkg/share/vim/vim$VIMRELEASE"
- ;;
- linux-gnu)
- [ -d "/usr/share/vim/vim$VIMRELEASE" ] \
- && export VIMRUNTIME="/usr/share/vim/vim$VIMRELEASE"
- ;;
-esac
-
-# That's for my Linuxbox (Slackware); OpenBSD doesn't support
-# locale :/
-if [ "${OSTYPE}" = linux-gnu ] && [ -x $(which locale) ]; then
- # All of the below
- export LC_ALL="en_US.iso885915"
- # language information
- export LANG="en_US.iso885915"
- # Character classification and case conversion.
- export LC_CTYPE="en_US.iso885915"
- # Non-monetary numeric formats.
- export LC_NUMERIC="en_US.iso885915"
- # Date and time formats.
- export LC_TIME="en_US.iso885915"
- # Collation order.
- export LC_COLLATE="en_US.iso885915"
- # Monetary formats.
- export LC_MONETARY="en_US.iso885915"
- # ormats of informative and diagnostic messages and interactive responses.
- export LC_MESSAGES="en_US.iso885915"
- # Paper size format.
- export LC_PAPER="en_US.iso885915"
- # Define format of names.
- export LC_NAME="en_US.iso885915"
- # Format of addresses.
- export LC_ADDRESS="en_US.iso885915"
- # Format of telephon numbers.
- export LC_TELEPHONE="en_US.iso885915"
- # Format of dimensions.
- export LC_MEASUREMENT="en_US.iso885915"
- # Identify locale informations.
- export LC_IDENTIFICATION="en_US.iso885915"
-else
- export LC_ALL=POSIX
-fi
-
-
-# $ cd /usr/ports/misc/fileutils
-# $ make install clean
-# di = directory
-# fi = file
-# ln = symbolic link
-# pi = fifo file
-# so = socket file
-# bd = block (buffered) special file (block device)
-# cd = character (unbuffered) special file (character device)
-# or = symbolic link pointing to a non-existent file (orphan)
-# mi = non-existent file pointed to by a symbolic link (visible when you type ls -l)
-# ex = file which is executable (ie. has 'x' set in permissions (executable)).
-#
-# 0 = default color 1 = bold
-# 4 = underlined 5 = flashing text
-# 7 = reverse field 31 = red
-# 32 = green 33 = orange
-# 34 = blue 35 = purple
-# 36 = cyan 37 = grey
-# 40 = black background 41 = red background
-# 42 = green background 43 = orange background
-# 44 = blue background 45 = purple background
-# 46 = cyan background 47 = grey background
-# 90 = dark grey 91 = light red
-# 92 = light green 93 = yellow
-# 94 = light blue 95 = light purple
-# 96 = turquoise 100 = dark grey background
-# 101 = light red background 102 = light green background
-# 103 = yellow background 104 = light blue background
-# 105 = light purple background 106 = turquoise background
-#
-# Attribute codes:
-# 00 none
-# 01 bold
-# 02 faint 22 normal
-# 03 standout 23 no-standout
-# 04 underline 24 no-underline
-# 05 blink 25 no-blink
-# 07 reverse 27 no-reverse
-# 08 conceal
-#
-# export LS_COLORS="fi=36:di=32:ln=1;33:ec=\\e[0;37m:ex=1:mi=1;30:or=1;30:*.c=32:*.bz=32:*.txt=36;1:*.doc=37:*.zip=1;32:*.rar=1;32:*.lzh=1;32:*.lha=1;32:*.arj=1;32:*.tar=1;32:*.tgz=1;32:*.gz=1;32:*~=1;30:*.bak=1;30:*.jpg=1;35:*.gif=1;35:*.tif=1;35:*.tiff=1;35:*.mod=1;31:*.voc=1;31:*.smp=1;31:*.au=1;31:*.wav=1;31:*.s3m=1;31:*.xm=1;31:*.pl=1;33:*.c=1;33"
-LS_COLORS=''
-LS_COLORS=$LS_COLORS:'no=0' # Normal text = Default foreground
-LS_COLORS=$LS_COLORS:'fi=0' # Regular file = Default foreground
-LS_COLORS=$LS_COLORS:'di=32' # Directory = Bold, Yellow
-LS_COLORS=$LS_COLORS:'ln=01;36' # Symbolic link = Bold, Cyan
-LS_COLORS=$LS_COLORS:'pi=33' # Named pipe = Yellow
-LS_COLORS=$LS_COLORS:'so=01;35' # Socket = Bold, Magenta
-LS_COLORS=$LS_COLORS:'do=01;35' # DO = Bold, Magenta
-LS_COLORS=$LS_COLORS:'bd=01;37' # Block device = Bold, Grey
-LS_COLORS=$LS_COLORS:'cd=01;37' # Character device = Bold, Grey
-LS_COLORS=$LS_COLORS:'ex=94' # Executable file = Light, Blue
-LS_COLORS=$LS_COLORS:'*FAQ=31;7' # FAQs = Foreground Red, Background Black
-LS_COLORS=$LS_COLORS:'*README=31;7' # READMEs = Foreground Red, Background Black
-LS_COLORS=$LS_COLORS:'*INSTALL=31;7' # INSTALLs = Foreground Red, Background Black
-LS_COLORS=$LS_COLORS:'*.sh=47;31' # Shell-Scripts = Foreground White, Background Red
-LS_COLORS=$LS_COLORS:'*.vim=35' # Vim-"Scripts" = Purple
-LS_COLORS=$LS_COLORS:'*.swp=00;44;37' # Swapfiles (Vim) = Foreground Blue, Background White
-LS_COLORS=$LS_COLORS:'*.sl=30;33' # Slang-Scripts = Yellow
-LS_COLORS=$LS_COLORS:'*,v=5;34;93' # Versioncontrols = Bold, Yellow
-LS_COLORS=$LS_COLORS:'or=01;05;31' # Orphaned link = Bold, Red, Flashing
-LS_COLORS=$LS_COLORS:'*.c=1;32' # Sources = Bold, Yellow
-LS_COLORS=$LS_COLORS:'*.C=1;33' # Sources = Bold, Yellow
-LS_COLORS=$LS_COLORS:'*.h=1;33' # Sources = Bold, Yellow
-LS_COLORS=$LS_COLORS:'*.cc=1;33' # Sources = Bold, Yellow
-LS_COLORS=$LS_COLORS:'*.awk=1;33' # Sources = Bold, Yellow
-LS_COLORS=$LS_COLORS:'*.pl=1;33' # Sources = Bold, Yellow
-LS_COLORS=$LS_COLORS:'*.jpg=1;32' # Images = Bold, Green
-LS_COLORS=$LS_COLORS:'*.jpeg=1;32' # Images = Bold, Green
-LS_COLORS=$LS_COLORS:'*.JPG=1;32' # Images = Bold, Green
-LS_COLORS=$LS_COLORS:'*.gif=1;32' # Images = Bold, Green
-LS_COLORS=$LS_COLORS:'*.png=1;32' # Images = Bold, Green
-LS_COLORS=$LS_COLORS:'*.jpeg=1;32' # Images = Bold, Green
-LS_COLORS=$LS_COLORS:'*.ppm=1;32' # Images = Bold, Green
-LS_COLORS=$LS_COLORS:'*.pgm=1;32' # Images = Bold, Green
-LS_COLORS=$LS_COLORS:'*.pbm=1;32' # Images = Bold, Green
-LS_COLORS=$LS_COLORS:'*.tar=31' # Archive = Red
-LS_COLORS=$LS_COLORS:'*.tgz=31' # Archive = Red
-LS_COLORS=$LS_COLORS:'*.gz=31' # Archive = Red
-LS_COLORS=$LS_COLORS:'*.zip=31' # Archive = Red
-LS_COLORS=$LS_COLORS:'*.sit=31' # Archive = Red
-LS_COLORS=$LS_COLORS:'*.lha=31' # Archive = Red
-LS_COLORS=$LS_COLORS:'*.lzh=31' # Archive = Red
-LS_COLORS=$LS_COLORS:'*.arj=31' # Archive = Red
-LS_COLORS=$LS_COLORS:'*.bz2=31' # Archive = Red
-LS_COLORS=$LS_COLORS:'*.html=36' # HTML = Cyan
-LS_COLORS=$LS_COLORS:'*.htm=1;34' # HTML = Bold, Blue
-LS_COLORS=$LS_COLORS:'*.doc=1;34' # MS-Word *lol* = Bold, Blue
-LS_COLORS=$LS_COLORS:'*.txt=1;34' # Plain/Text = Bold, Blue
-LS_COLORS=$LS_COLORS:'*.o=1;36' # Object-Files = Bold, Cyan
-LS_COLORS=$LS_COLORS:'*.a=1;36' # Shared-libs = Bold, Cyan
-export LS_COLORS
-
-
-# The format of login / logout reports if the watch parameter is set.
-# Default is `%n has %a %l from %m'.
-# Recognizes the following escape sequences:
-# %n = name of the user that logged in/out.
-# %a = observed action, i.e. "logged on" or "logged off".
-# %l = line (tty) the user is logged in on.
-# %M = full hostname of the remote host.
-# %m = hostname up to the first `.'.
-# %t or %@ = time, in 12-hour, am/pm format.
-# %w = date in `day-dd' format.
-# %W = date in `mm/dd/yy' format.
-# %D = date in `yy-mm-dd' format.
-# WATCHFMT='%n %a %l from %m at %t.'
-# WATCHFMT='*knock* *knock* Follow the white rabbit => %n %a %l from %m at %t.'
-# WATCHFTM=print '\e[1;35m%B[%b\e[1;32m%B%n%b\e[1;35m%B]%b \e[1;34m%U%a%u \e[1;35mfrom terminal \e[1;31m%M \e[1;35mat \e[1;33m%U%T%u\e[0m''
-#WATCHFMT="[%B%t%b] %B%n%b has %a %B%l%b from %B%M%b"
-WATCHFMT="%B->%b %n has just %a %(l:tty%l:%U-Ghost-%u)%(m: from %m:)"
-
-# If this parameter is nonzero, the shell will receive an ALRM signal if a
-# command is not entered within the specified number of seconds after issuing a
-# prompt. If there is a trap on SIGALRM, it will be executed and a new alarm is
-# scheduled using the value of the TMOUT parameter after executing the trap.
-#TMOUT=1800
-
-# format of process time reports with 'time'
-# %% A `%'.
-# %U CPU seconds spent in user mode.
-# %S CPU seconds spent in kernel mode.
-# %E Elapsed time in seconds.
-# %P The CPU percentage, computed as (%U+%S)/%E.
-# %J The name of this job.
-# Default is:
-# %E real %U user %S system %P %J
-TIMEFMT="Real: %E User: %U System: %S Percent: %P Cmd: %J"
-
-# The maximum number of events stored in the internal history list. If you use
-# the HIST_EXPIRE_DUPS_FIRST option, setting this value larger than the
-# SAVEHIST size will give you the difference as a cushion for saving
-# duplicated history events.
-HISTSIZE=100000
-
-# Stop annoying MailChecks. I'm not using AOL
-unset MAILCHECK
-
-# The name of the file used to store command history. When assigned to, history
-# is loaded from the specified file. Also, several invocations of the shell
-# running on the same machine will share history if their HISTFILE parameters
-# all point to the same file.
-# i have finally discovered the difference between `SAVEHIST' and `HISTSIZE'
-# thanks to the FAQ. `HISTSIZE' is the number of lines of history that is
-# kept within any given, running zsh. `SAVEHIST' is the number of lines of
-# history that is written out to a file at the magic, mysterious moment
-# when that event occurs. so cat-ing `HISTFILE' into wc -l should enumerate
-# the number of history events
-HISTFILE=$HOME/.zsh_history
-SAVEHIST=65536
-DIRSTACKSIZE=50
-
-# If nonnegative, commands whose combined user and system execution
-# times (measured in seconds) are greater than this value have timing
-# statistics printed for them.
-REPORTTIME=60
-
-# Limit this fuckung "zsh: do you wish to see all NNN possibilities (NNN
-# lines)?" downward (default is 100). Only ask before displaying
-# completions if doing so would scroll.
-LISTMAX=0
-
-# Seconds for login / logout check
-LOGCHECK=20
-
-# Define some ftp-hosts ($ ftp <TAB>)
-hosts=( ftp.{free,open,net}bsd.org
- ftp rtfm.mit.edu
- ftp.leo.org
- ftp.2600.com
- ftp.ciac.llnl.gov
- ftp.de.kernel.org
- ftp.mitglied.lycos.de
- ftp.strcat.neessen.net
- ftp.revier.com
- 127.0.0.1
- 192.168.13.{1..9}
- )
-zstyle ':completion:*:*:ftp:*' hosts $hosts
-
-# Set the default system $PATH:
-# PATH="/usr/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/"
-#PATH="/sbin:/usr/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/home/dope/bin:/"
-#for foo in ~/bin ~/progs/bin; do
-# if [[ -z ${path[(r)$dir]} ]]; then
-# path=($dir $path)
-# fi
-#done
-# /Default/-PATH
- PATH="/bin:/sbin:/usr/bin:/usr/sbin"
-# If ~/bin exist, add it to $PATH (~/bin contains some scripts, ..)
- [ -d "${HOME}/bin" ] && PATH="${PATH}:${HOME}/bin"
-# Same here, but ~/dev-bin contains "unstable" software (WMI, Zsh, GCC,
-# ..)
- [ -d "${HOME}/dev-bin" ] && PATH="${PATH}:${HOME}/dev-bin/bin"
- [ -d "${HOME}/dev-bin" ] && PATH="${PATH}:${HOME}/dev-bin/sbin"
-
- # Check some directories and add existing to $PATH
- for dir in \
- /usr/local/bin \
- /usr/local/sbin \
- /usr/X11R6/bin \
- /usr/share/texmf/bin \
- /usr/X11R6/libexec/fvwm/2.4.16 \
- /usr/lib/java/bin \
- /var/qmail/bin \
- /usr/pkg/bin \
- /usr/pkg/sbin \
- /usr/games
- do
- [ -d "${dir}" ] && PATH="${PATH}:${dir}"
- done
-
-# For root users, ensure that /usr/local/sbin, /usr/sbin, and /sbin are in
-if (( EUID == 0 )); then
- echo $PATH | grep /usr/local/sbin 1> /dev/null 2> /dev/null
- if [ ! $? = 0 ]; then
- PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
- fi
-fi
-
-
-# if your compdef Dir is ~/.zsh
-fpath=( $fpath /usr/local/share/zsh/$ZSH_VERSION/functions/ ~/.zsh/func/ )
-
-# See <http://sugi.nemui.org/doc/zsh/> for details.
-if autoload +X -U _accept_line_with_url > /dev/null 2>&1 ; then
- zle -N accept-line-with-url _accept_line_with_url
- bindkey '^M' accept-line-with-url
- bindkey '^J' accept-line-with-url
- export DOWNLOADER="wget -S"
-fi
-
-# Using Opera as browser when X11 is up
-if [ $DISPLAY ]; then
- export WWW_BROWSER="~/.firefox/firefox %s"
-else
- export WWW_BROWSER=${BROWSER:-lynx}
-fi
-
-# Clean the non-existing dirs from my $PATH before export $PATH
-# ,----[ It's evil.. isn't it? ]
-# | [dope@dreckskind:~]% PATH=/bin:/usr/games:/bin
-# | [dope@dreckskind:~]% echo $PATH
-# | /bin:/usr/games:/bin
-# | [dope@dreckskind:~]% path=($^path(N))
-# | [dope@dreckskind:~]% echo $PATH
-# | /bin:/usr/games
-# | [dope@dreckskind:~]%
-# `----
-#path=($^path(N))
-#export PATH
-
-# automatically remove duplicates from these arrays
-typeset -gU path cdpath manpath fpath
-
-# RTFM!!!11!
-MANPATH="/usr/share/man:/usr/local/man"
-for mdir in \
- /backups/Documentations/manpages.de \
- /home/dope/dev-bin/man \
- /var/qmail/man \
- /usr/X11/man \
- /usr/X11R6/man \
- /usr/share/texmf/man \
- /usr/contrib/man \
- /usr/share/man/old
-do
- [ -d "${mdir}" ] && MANPATH="${MANPATH}:${mdir}"
-done
-
-# notices on new mails
-#--------------------------------------------------
-# mailpref=/home/dope/MuttMail
-# mailpath=($mailpref/INBOX'?New Mail in your INBOX'
-# $mailpref/Cron'?New Mail from Cron')
-#--------------------------------------------------
-#--------------------------------------------------
-# typeset -a mailpath
-# for i in ~/MuttMail/**/new; do
-# mailpath[$#mailpath+1]="${i}?You have new mail in ${i:h}."
-# done
-#--------------------------------------------------
-
-# PS{1,2,3}, RPOMPT, ..
-# The "prompt" of the shell.
-# See zshmisc(1) (/PROMPT EXPANSION) for details.
-#
-# %n $USERNAME.
-# @ literal '@'
-# %m machine name.
-# %M The full machine hostname.
-# %% %
-# %/ Present working directory ($PWD) (i. e.: /home/$USERNAME)
-# %~ Present working directory ($PWD) (i. e.: ~)
-# %h Current history event number.
-# %! Current history event number.
-# %L The current value of $SHLVL.
-# %S (%s) Start (stop) standout mode.
-# %U (%u) Start (stop) underline mode.
-# %B (%b) Start (stop) boldface mode.
-# %t / %@ Current time of day, in 12-hour, am/pm format.
-# %T Current time of day, in 24-hour format.
-# %* Current time of day in 24-hour format, with seconds
-# %N The name of the script, sourced file, or shell
-# function that zsh is currently executing,
-# %i The line number currently being executed in the script
-# %w The date in day-dd format.
-# %W The date in mm/dd/yy format.
-# %D The date in yy-mm-dd format.
-# %D{string} string is formatted using the strftime function (strftime(3))
-# %l The line (tty) the user is logged in on
-# %? The return code of the last command executed just before the prompt
-# %_ The status of the parser
-# %E Clears to end of line
-# %# A `#' if the shell is running with privileges, a `%' if not
-# %v The value of the first element of the psvar array parameter
-# %{...%} Include a string as a literal escape sequence
-# : literal ':'
-# %Nc "relative path", ie last N components of $PWD.
-# > literal '>'
-#
-# Some examples:
-# PS1="PS1='%B%n%b@%m:%4c>'"
-# PS1="%B(%b%n@%m%B)%b : %B(%b%3~%B)%b: "
-# PS1=$'%{\e[1;31m%}[%n@%m:%~ ]%{\e[0m%} '
-# PS1=$'%{\e[0;36m%}%n%{\e[0m%}:%{\e[0;31m%}%3~%{\e[0m%}%# ' ## user:~%
-# PS1=$'%{\e[0;36m%}%n%{\e[0m%}:%{\e[0;31m%}%3~%{\e[0m%}%B>%b ' ## user:~>
-# PS1='%n@%m:%4c%1v> ';RPS1=$'%{\e[0;36m%}%D{%A %T}%{\e[0m%}' ## user@host:~> ; Day time(hh:mm:ss)
-# PS1='%B[%b%n%B:%b%~%B]%b$ ' ## [user:~]$
-# PS1=$'%{\e[0;36m%}%n%{\e[0m%}:%20<..<%~%B>%b ' ## user:..c/vim-common-6.0>
-# PS1=$'%{\e[0;36m%}%#%{\e[0m%} ';RPS1=$'%{\e[0;31m%}%~%{\e[0m%}' ## % ; ~
-# PS1=$'%{\e[0;36m%}%n%{\e[0m%}%{\e[0;31m%}%#%{\e[0m%} ';RPS1=$'%{\e[0;31m%}%~%{\e[0m%}' ## user% ; ~
-# PS1='%# ';RPS1='%B%~%b' ## % ; ~ : no colors
-# PS1='%n@%m:%B%~%b> ' ## user@host:~> : no colors
-# PS1=$'%{\e[1;31m%}%B(%b%{\e[0m%}%n@%m%{\e[1;31m%})%{\e[0m%} : %{\e[1;31m%}(%{\e[0m%}%~%{\e[1;31m%})%{\e[0m%}: '
-# PS1=$'%{\e[0;33m%}[%{\e[0m%}%n%{\e[0;33m%}@%{\e[0m%}%m%{\e[0;33m%}:%{\e[0m%}%~%{\e[0;33m%}]%{\e[0m%}%# '
-# PS1=$(echo '\033[1m\033[30m(%/)\033[0m\033[39m\n[%n@%m \033[0m\033[34m%~\033[0m\033[39m]%# ')
-# PS1='%n@%U%m%u %B%30<..<%~%b %(!.#.>)' # user@host (underlined), pwd(bold; max 30 chars.) > or #
-# PS1=$'%{\e[0;31m%}[%{\e[0;36m%}%n%{\e[0;32m%}@%{\e[0;35m%}%m%{\e[0;34m%}:%{\e[0;33m%}%.%{\e[0;31m%}]%{\e[0;0m%}%# '
-# random colors? sure. no problem ;)
-# $ setopt prompt_subst ; PROMPT=$'[%{\e[$((color=$((30+$RANDOM % 8))))m%}%n@%m %c%{\e[00m%}]%% '
-#
-# You can use ``promptinit'' for the zsh prompt themes extension. See
-# ``less ${^fpath}/promptinit(N)'' for details. btw. http://aperiodic.net/phil/prompt/
-# is a good prompt introduction for the Z shell
-
-if [[ $SSH_CLIENT = *.* || $REMOTEHOST = *.* ]]; then
- RPROMPT=$SSH_CLIENT
-fi
-if (( EUID == 0 )); then
- PS1=$'%{\e[0;33m%}%B[%b%{\e[0m%}%n%{\e[0;33m%}%B@%b%{\e[0m%}%m%{\e[0;33m%}:%{\e[0m%}%~%{\e[0;33m%}%B]%b%{\e[0m%}%# '
-else
- case $HOST in
- dreckskind)
- PROMPT=$'\n%{\e[31m%}[%{\e[3;41;1;30m%}%n%{\e[0;31m%}@%{\e[3;41;1;30m%}%m%{\e[0;31m%}:%{\e[3;41;1;30m%}%~%{\e[0;31m%}] #%{\e[0m%} '
- ;;
- painless)
- PROMPT=$'%{\e[0;31m%}%B[%b%{\e[0m%}%n%{\e[0;31m%}@%{\e[0m%}%m%{\e[0;31m%}%B:%b%{\e[0m%}%~%{\e[0;31m%}%B]%b%{\e[0m%}%# '
- # On 'exit-Status != 0' display a ":(" on the right side.
- RPROMPT="%(?..:()%"
- ;;
- hellfire)
- autoload promptinit; promptinit ; prompt elite2 red
- #PROMPT=$'\n%{\e[31m%}[%{\e[3;41;1;30m%}%n%{\e[0;31m%}@%{\e[3;41;1;30m%}%m%{\e[0;31m%}:%{\e[3;41;1;30m%}%~%{\e[0;31m%}] #%{\e[0m%} '
- ;;
- blitzkrieg)
- PS1=$'%{\e[0;36m%}%n%{\e[0m%}%{\e[0;31m%}%#%{\e[0m%} '
- RPS1=$'%{\e[0;31m%}%~%{\e[0m%}'
- ;;
- diehard)
- PS1=$'%{\e[0;36m%}%n%{\e[0m%}:%{\e[0;31m%}%3~%{\e[0m%}%# '
- ;;
- *)
- PROMPT="[%n@%m] "
- RPROMPT="[%~]"
- esac
-fi
-
-# Change the title in xterm
-if [[ $TERM = (xterm|rxvt) ]]; then
- precmd () { print -Pn "\e]0;[ %n@%m: %~ ] \a" }
-fi
-
-
-# Executed whenever a command has a non-zero exit status:
-#--------------------------------------------------
-# TRAPZERR() { echo 'AAAAAAAARRRRGHHHHH!!'; }
-#--------------------------------------------------
-
-#--------------------------------------------------
-#red='%{\e[0;31m%}'
-#white_on_blue='%{\e[0;37;44m%}'
-#blue='%{\e[0;34m%}'
-#nocolor='%{\e[0m%}'
-# function precmd {
-# PROMPT="${white_on_blue}--INSERT--$nocolor [%~]
-# $red%B[%b$nocolor%n$red@$nocolor%m$red%B]%b$nocolor%% " }
-#--------------------------------------------------
-
-# The prompt used for spelling correction. The sequence `%R' expands to
-# the string which presumably needs spelling correction, and `%r' expands
-# to the proposed correction. All other prompt escapes are also allowed.
-SPROMPT=$'%BError!%b Correct %{\e[31m%}%R%{ \e[0m%}to%{ \e[36m%}%r%{ \e[0m%}? [No/Yes/Abort/Edit]: '
+++ /dev/null
-# Globbing is simple? Sure .. See zshexpn(1) /Glob Qualifiers for details and
-# come back ;)
-function H-Glob()
-{
-echo -e "
- / directories
- . plain files
- @ symbolic links
- = sockets
- p named pipes (FIFOs)
- * executable plain files (0100)
- % device files (character or block special)
- %b block special files
- %c character special files
- r owner-readable files (0400)
- w owner-writable files (0200)
- x owner-executable files (0100)
- A group-readable files (0040)
- I group-writable files (0020)
- E group-executable files (0010)
- R world-readable files (0004)
- W world-writable files (0002)
- X world-executable files (0001)
- s setuid files (04000)
- S setgid files (02000)
- t files with the sticky bit (01000)
- print *(m-1) # Dateien, die vor bis zu einem Tag modifiziert wurden.
- print *(a1) # Dateien, auf die vor einem Tag zugegriffen wurde.
- print *(@) # Nur Links
- print *(Lk+50) # Dateien die ueber 50 Kilobytes grosz sind
- print *(Lk-50) # Dateien die kleiner als 50 Kilobytes sind
- print **/*.c # Alle *.c - Dateien unterhalb von \$PWD
- print **/*.c~file.c # Alle *.c - Dateien, aber nicht 'file.c'
- print (foo|bar).* # Alle Dateien mit 'foo' und / oder 'bar' am Anfang
- print *~*.* # Nur Dateien ohne '.' in Namen
- chmod 644 *(.^x) # make all non-executable files publically readable
- print -l *(.c|.h) # Nur Dateien mit dem Suffix '.c' und / oder '.h'
- print **/*(g:users:) # Alle Dateien/Verzeichnisse der Gruppe >users<
- echo /proc/*/cwd(:h:t:s/self//) # Analog zu >ps ax | awk '{print $1}'<"
-}
-
-# colorizing the output of make
-if [[ -x ~/bin/makefilter ]]
-then
- make() { command make "$@" |& makefilter }
-fi
-
-# check if ~/.errorlogs/ exist (otherwise create it) and create a
-# ``logfile'' e. g. ``makelog-vim-6.3''
-function mmake()
-{
- [[ ! -d ~/.errorlogs ]] && mkdir ~/.errorlogs
- =make -n install > ~/.errorlogs/${PWD##*/}-makelog
-}
-
-# Search for the argument in the system libraries
-function lcheck()
-{
- nm -go /usr/lib/lib*.a /usr/lobal/lib/lib*.a 2>/dev/null | grep ":[[:xdigit:]]\{8\} . .*$1"":[[:xdigit:]]\{8\} . .*$1"
-}
-
-# clean directory
-function purge()
-{
- FILES=(*~(N) .*~(N) \#*\#(N) *.o(N) a.out(N) *.core(N) *.cmo(N) *.cmi(N) .*.swp(N))
- NBFILES=${#FILES}
- if [[ $NBFILES > 0 ]]; then
- print $FILES
- local ans
- echo -n "Remove this files? [y/n] "
- read -q ans
- if [[ $ans == "y" ]]
- then
- rm ${FILES}
- echo ">> $PWD purged, $NBFILES files removed"
- else
- echo "Ok. .. than not.."
- fi
- fi
-}
-
-# display a of possible passwords.
-function makepasswords()
-{
- perl <<EOPERL
- my @a = ("a".."z","A".."Z","0".."9",(split //, q{#@,.<>$%&()*^}));
- for (1..10) {
- print join "", map { \$a[rand @a] } (1..rand(3)+7);
- print qq{\n}
- }
-EOPERL
-}
-# AUTOMATIC ls on chpwd *if* directly isn't too big.
-# Not really needed ;o)
-#function chpwd
-#{
-# integer ls_lines="$(ls -C | wc -l)"
-# if [ $ls_lines -eq 0 ]; then
-# echo No files found: Empty Directory
-# elif [ $ls_lines -le 18 ]; then
-# ls
-# echo "\e[1;32m --[ Items: `ls -l | wc -l` \e[1;32m]--"
-# else
-# echo Directory Exceeds Limits.
-# fi
-#}
-
-# ssh-add -- wrap ssh-add to default to adding all identities in
-# ${HOME}/.ssh
-function ssh-add()
-{
- local files
- if [[ $# -eq 0 ]] ; then
- for i in id_dsa id_rsa identity ; do
- if [[ -f $HOME/.ssh/$i ]] ; then
- files=($files $HOME/.ssh/$i)
- fi
- done
- else
- files=( "$@" )
- fi
- command ssh-add $files
-}
-
-# Name (``hash -d'') all the subdirectories in given directory
-# $ mkdir -p foo/{bar,foo,fnord,recursion}
-# $ quick-hash foo
-# $ hash -d
-# bar=foo/bar
-# fnord=foo/fnord
-# foo=foo/foo
-# recursion=foo/recursion
-function quick-hash()
-{
- for i in $1/*(/)
- do
- hash -d ${i##*/}=$i
- done
-}
-
-# print current settings of LC_*
-function plocale()
-{
- print LC_ALL=$LC_ALL
- print LANG=$LANG
- print LC_CTYPE=$LC_CTYPE
- print LC_NUMERIC=$LC_NUMERIC
- print LC_TIME=$LC_TIME
- print LC_COLLATE=$LC_COLLATE
- print LC_MONETARY=$LC_MONETARY
- print LC_MESSAGES=$LC_MESSAGES
- print LC_PAPER=$LC_PAPER
- print LC_NAME=$LC_NAME
- print LC_ADDRESS=$LC_ADDRESS
- print LC_TELEPHONE=$LC_TELEPHONE
- print LC_MEASUREMENT=$LC_MEASUREMENT
- print LC_IDENTIFICATION=$LC_IDENTIFICATION
-}
-# a clock in the prompt.
-#trap CRON ALRM
-#TMOUT=1
-#CRON() {
-# local STRING
-# local COL
-# local x
-# STRING=$(date)
-# COL=$[COLUMNS-5]
-# COL=$[COL-$#STRING]
-# x=$(echo $PREBUFFER | wc -l )
-# x=$[x+1]
-# echo -n "\e7\e[$x;A\e[$COL;G\e[0;37;44m-- $STRING --\e[0m\e8"
-#}
-
-# invoke this every time when u change .zshrc to recompile it.
-function src()
-{
- autoload -U zrecompile
- [ -f ~/.zshrc ] && zrecompile -p ~/.zshrc
- [ -f ~/.zcompdump ] && zrecompile -p ~/.zcompdump
- [ -f ~/.zcompdump ] && zrecompile -p ~/.zcompdump
- [ -f ~/.zshrc.zwc.old ] && rm -f ~/.zshrc.zwc.old
- [ -f ~/.zcompdump.zwc.old ] && rm -f ~/.zcompdump.zwc.old
- source ~/.zshrc
-}
-
-# Search for links in a directory and format the output
-# Note: '~/.fnord.awk' is a *very* simple script based on >awk<.
-# ,----
-# | $ cat ~/bin/fnord.awk
-# | BEGIN {
-# | regexp = ""
-# | regexp = regexp "((http|ftp)://)"
-# | regexp = regexp "[-0-9A-Za-z#%&+./:;?_~]"
-# | regexp = regexp "*[-0-9A-Za-z#%&+/:;?_~]"
-# | }
-# | NF {
-# | while (match($0, regexp))
-# | {
-# | print substr($0, RSTART, RLENGTH)
-# | $0 = substr($0, RSTART + RLENGTH)
-# | }
-# | }
-# | END {}
-# `----
-function URL-search()
-{
- if [[ $# = 0 ]]
- then
- echo "Usage : $0 directory"
- echo "Example : $0 ~/Mail"
- echo "Example : $0 directory | \$PAGER"
- echo "Example : $0 directory > logfile"
- else
- egrep -r -h -i '((ftp|https|http|www):.*)' $1 | awk -f ~/bin/fnord.awk | sort | uniq
- fi
-}
-
-# Happy CVS'ing
-function cvsd() { cvs diff -N $* |& $PAGER }
-function cvsl() { cvs log $* |& $PAGER }
-function cvsr() { rcs2log $* | $PAGER }
-function cvss() { cvs status -v $* }
-function cvsq() { cvs -nq update }
-function cvsa() { cvs add $* && cvs com -m 'initial checkin' $* }
-
-# Display the permissions in octal from given file. Not really needed.
-# Use http://www.strcat.de/hacks/perm-oktal.pl instead
-# function perm-oktal()
-#{
-# echo $1 | perl -e 'chomp($s=<>);$p=(stat($s))[2] & 07777;printf "$s -> %04o\n",$p'
-#}
-
-# Translate DE<=>EN
-# *narf* .. 'translate' looks up fot a word in a file with language-to-language
-# translations (field separator should be " : "). A typical wordlist looks
-# like at follows:
-# | english-word : german-transmission
-# It's also only possible to translate english to german but not reciprocal.
-# Use the following oneliner to turn back the sort order:
-# $ awk -F ':' '{ print $2" : "$1" "$3 }' \
-# /usr/local/lib/words/en-de.ISO-8859-1.vok > ~/.translate/de-en.ISO-8859-1.vok
-function trans()
-{
- case "$1" in
- -[dD]*) translate -l de-en $2
- ;;
- -[eE]*) translate -l en-de $2
- ;;
- *)
- echo "Usage: $0 { -D | -E }"
- echo " -D == German to English"
- echo " -E == English to German"
- esac
-}
-
-# Some quick Perl-hacks aka /useful/ oneliner
-function bew() { perl -e 'print unpack "B*","'$1'"' ; perl -e 'print "\n"' }
-function web() { perl -e 'print pack "B*","'$1'"' ; perl -e 'print "\n"' }
-function hew() { perl -e 'print unpack "H*","'$1'"' ; perl -e 'print "\n"' }
-function weh() { perl -e 'print pack "H*","'$1'"' ; perl -e 'print "\n"' }
-function pversion() { perl -M$1 -le "print $1->VERSION" } # i. e."pversion LWP -> 5.79"
-function getlinks () { perl -ne 'while ( m/"((www|ftp|http):\/\/.*?)"/gc ) { print $1, "\n"; }' $* }
-function gethrefs () { perl -ne 'while ( m/href="([^"]*)"/gc ) { print $1, "\n"; }' $* }
-function getanames () { perl -ne 'while ( m/a name="([^"]*)"/gc ) { print $1, "\n"; }' $* }
-function getforms () { perl -ne 'while ( m:(\</?(input|form|select|option).*?\>):gic ) { print $1, "\n"; }' $* }
-function getstrings () { perl -ne 'while ( m/"(.*?)"/gc ) { print $1, "\n"; }' $*}
-function getanchors () { perl -ne 'while ( m/«([^«»\n]+)»/gc ) { print $1, "\n"; }' $* }
-function showINC () { perl -e 'for (@INC) { printf "%d %s\n", $i++, $_ }' }
-function vimpm () { vim `perldoc -l $1 | sed -e 's/pod$/pm/'` }
-function vimhelp () { vim -c "help $1" -c on -c "au! VimEnter *" }
-
-# set the DISPLAY to where i'm logged from or - if an argument is specified -
-# to the value of the argument
-function disp()
-{
- if [[ $# == 0 ]]
- then
- DISPLAY=$(who am i | awk '{print $6}' | tr -d '()'):0
- else
- DISPLAY="${*}:0"
- fi
- export DISPLAY
-}
-
-# adds a directory to the PATH, without making duplicate entries
-function add_to_path()
-{
- if [[ "$1" == "" ]]
- then
- echo "Usage: $0 directory"
- else
- unset SPACEPATH
- local SPACEPATH
- for i in ${(s.:.)PATH}
- do
- SPACEPATH=( $SPACEPATH $i )
- done
- typeset -U SPACEPATH
- if [[ -d "$1" ]]; then; SPACEPATH=( $SPACEPATH "$1" ); fi
- PATH="`echo $SPACEPATH`"
- PATH=${PATH:gs/ /:/}
- export PATH
- rehash
-fi
-}
-
-# Shameless stolen from Sven Guckes (<http://www.guckes.net/setup/zshrc.mine>)
-# _lap foo -- list all programs with prefix "foo":
-function _lap()
-{
- if [[ $# = 0 ]]
- then
- echo "Usage: $0 program"
- echo "Example: $0 zsh"
- echo "Lists all occurrences of program in the current PATH."
- else
- ls -l ${^path}/*$1*(*N)
- fi
-}
-
-# A life without 'diff'? Unimaginably!!!!11!
-function mdiff() { diff -udrP "$1" "$2" > diff.`date "+%Y-%m-%d"`."$1" }
-function udiff() { diff -urd $* | egrep -v "^Only in |^Binary files " }
-function cdiff() { diff -crd $* | egrep -v "^Only in |^Binary files " }
-
-# List / Search / Browse in a archive without unpack
-function lynxbzgrep() { lynx -force_html -dump =(bzip2 -cd $1) | grep -i $2 }
-function browse-archive() { lynx -force_html <( gzip -cd $1 ) }
-
-# show/search signatures ;-)
-# random-signature.pl can be found at
-# <http://www.strcat.de/hacks/random-signature.pl>
-function sig()
-{
- if [[ $# = 0 ]]; then
- random-signature.pl; < ~/.signature
- else
- agrep -d "^-- $" $@ ~/.sigs/own-stuff
- fi
-}
-
-# mkdir && cd
-function mcd() { mkdir "$1"; cd "$1" }
-
-# $ ls -l =ls
-# $ -r-xr-xr-x 1 root bin 167936 Oct 4 2002 /bin/ls
-# $ pls ls
-# $ -r-xr-xr-x 1 root bin 167936 Oct 4 2002 /bin/ls
-function pls() { ls -l =$1 }
-
-# cd && ls
-function cl() { cd $1 && ls -a }
-
-# Use vim to convert plaintext to HTML
-function 2html() { vim -n -c ':so $VIMRUNTIME/syntax/2html.vim' -c ':wqa' $1 > /dev/null 2> /dev/null }
-
-# Often needed (if i rape '$LS_COLORS' again *g*)
-function _cols()
-{
- esc="\033["
- echo -e "\t 40\t 41\t 42\t 43\t 44\t 45\t 46\t 47"
- for fore in 30 31 32 33 34 35 36 37; do
- line1="$fore "
- line2=" "
- for back in 40 41 42 43 44 45 46 47; do
- line1="${line1}${esc}${back};${fore}m Normal ${esc}0m"
- line2="${line2}${esc}${back};${fore};1m Bold ${esc}0m"
- done
- echo -e "$line1\n$line2"
- done
-}
-
-# Usage: simple-extract <file>
-# Description: extracts archived files (maybe)
-simple-extract ()
-{
- if [[ -f $1 ]]
- then
- case $1 in
- *.tar.bz2) bzip2 -v -d $1 ;;
- *.tar.gz) tar -xvzf $1 ;;
- *.rar) unrar $1 ;;
- *.deb) ar -x $1 ;;
- *.bz2) bzip2 -d $1 ;;
- *.lzh) lha x $1 ;;
- *.gz) gunzip -d $1 ;;
- *.tar) tar -xvf $1 ;;
- *.tgz) gunzip -d $1 ;;
- *.tbz2) tar -jxvf $1 ;;
- *.zip) unzip $1 ;;
- *.Z) uncompress $1 ;;
- *) echo "'$1' Error. Please go away" ;;
- esac
- else
- echo "'$1' is not a valid file"
- fi
-}
-
-# Usage: smartcompress <file> (<type>)
-# Description: compresses files or a directory. Defaults to tar.gz
-smartcompress()
-{
- if [ $2 ]; then
- case $2 in
- tgz | tar.gz) tar -zcvf$1.$2 $1 ;;
- tbz2 | tar.bz2) tar -jcvf$1.$2 $1 ;;
- tar.Z) tar -Zcvf$1.$2 $1 ;;
- tar) tar -cvf$1.$2 $1 ;;
- gz | gzip) gzip $1 ;;
- bz2 | bzip2) bzip2 $1 ;;
- *)
- echo "Error: $2 is not a valid compression type"
- ;;
- esac
- else
- smartcompress $1 tar.gz
- fi
-}
-
-# Usage: show-archive <archive>
-# Description: view archive without unpack
-show-archive()
-{
- if [[ -f $1 ]]
- then
- case $1 in
- *.tar.gz) gunzip -c $1 | tar -tf - -- ;;
- *.tar) tar -tf $1 ;;
- *.tgz) tar -ztf $1 ;;
- *.zip) unzip -l $1 ;;
- *.bz2) bzless $1 ;;
- *) echo "'$1' Error. Please go away" ;;
- esac
- else
- echo "'$1' is not a valid archive"
- fi
-}
-
-# find process and kill it
-morons() { reply=(`ps ax | grep -v COMMAND |perl -nle '@a=split(" ",$_,9);$_=$a[4];s/[()]//g;s/.*\///g;print'`) }
-compctl -K morons pskill pkill
-pskill()
-{
- local signal="HUP"
- if [[ $1 == "" || $3 != "" ]]; then
- print "Usage: $0 processname [signal]" && return 1
- fi
- [[ $2 != "" ]] && signal=$2
- set -A pids $(command ps wwaux | grep $1 | grep -v "grep $1" | awk '{ print $2 }')
- if [[ ${#pids} -lt 1 ]]; then
- print "No matching processes for »$1«" && return 1
- fi
- if [[ ${#pids} -gt 1 ]]; then
- print "${#pids} processes matched: $pids"
- read -q "?Kill all? [y/n] " || return 0
- fi
- if kill -$signal $pids; then
- echo "Killed $1 pid $pids with SIG$signal"
- fi
-}
-
-# Use 'view' to read manpages, if u want colors, regex - search, ...
-# like vi(m).
-# It's shameless stolen from <http://www.vim.org/tips/tip.php?tip_id=167>
-function vman() { man $* | col -b | view -c 'set ft=man nomod nolist' - }
-
-# J-E-H-O-V-A!!!11!!
-# ,----
-# | $ (cd $PORTS_DIR && make print-index ~/.ports)
-# | $ grep -i "^Port.*xchat-" -B1 -A8 .ports
-# |
-# | Port: xchat-1.8.11
-# | Path: net/xchat
-# | Info: X-Chat is an X11 IRC client
-# | Maint: Damien Couderc <couderc@openbsd.org>
-# | Index: net x11
-# | L-deps: gdk_pixbuf::graphics/gdk-pixbuf iconv.2::converters/libiconv intl.1:gettext->=0.10.38:devel/gettext
-# | B-deps: :devel/gmake bzip2-*:archivers/bzip2 gettext->=0.10.38:devel/gettext
-# | R-deps: gettext->=0.10.38:devel/gettext libiconv-*:converters/libiconv
-# |
-# `----
-if [ "${OS}" = openbsd ]; then
- function port()
- {
- case "$1" in
- -p) =grep -i "^Port.*$2" -B1 -A8 ~/.ports
- ;;
- -i) =grep -i "^Info.*$2" -B1 -A5 ~/.ports
- ;;
- *)
- echo "Usage: $0 {-i | -p } string }"
- echo " -i (Info) Search parse Info:"
- echo " -p (Port) Search parse Port:"
- esac
- }
-fi
-
-# Exchange ' ' for '_' in filenames.
-unspaceit()
-{
- for _spaced in "${@:+"$@"}"; do
- if [ ! -f "${_spaced}" ]; then
- continue;
- fi
- _underscored=$(echo ${_spaced} | tr ' ' '_');
- if [ "${_underscored}" != "${_spaced}" ]; then
- mv "${_spaced}" "${_underscored}";
- fi
- done
-}
-
-# summarized google, ggogle, mggogle, agoogle and fm
-function search()
-{
- case "$1" in
- -g) ${BROWSER:-lynx} "http://www.google.com/search?q="$2""
- ;;
- -u) ${BROWSER:-lynx} "http://groups.google.com/groups?q="$2""
- ;;
- -m) ${BROWSER:-lynx} "http://groups.google.com/groups?selm="$2""
- ;;
- -a) ${BROWSER:-lynx} "http://groups.google.com/groups?as_uauthors="$2""
- ;;
- -c) ${BROWSER:-lynx} "http://search.cpan.org/search?query="$2"&mode=module"
- ;;
- -f) ${BROWSER:-lynx} "http://freshmeat.net/search/?q=$2§ion=projects"
- ;;
- -F) ${BROWSER:-lynx} "http://www.filewatcher.com/?q="$2""
- ;;
- -s) ${BROWSER:-lynx} "http://sourceforge.net/search/?type=soft&q="$2""
- ;;
- *)
- echo "Usage: $0 {-g | -u | -m | -a | -f | -c | -F}"
- echo " -g: Searching for keyword in google.com"
- echo " -u: Searching for keyword in groups.google.com"
- echo " -m: Searching for message-id in groups.google.com"
- echo " -a: Searching for Authors in groups.google.com"
- echo " -c: Searching for Modules on cpan.org."
- echo " -f: Searching for projects on Freshmeat."
- echo " -F: Searching for packages on FileWatcher."
- echo " -s: Searching for software on Sourceforge."
- esac
-}
-
-# Quick&dirty hack to read heise-news (<http://www.heise.de/>
-function heise()
-{
- CURDIR=${pwd};
- cd /tmp;
- if [[ -s tmp/heise.rdf ]]
- then
- rm heise.rdf
- fi
- wget -q -O - http://heise.de/newsticker/heise.rdf |\
- sed -e '/title/!d;s, <title>\(.*\)</title>,\1,' -e '/heise online/d' ;
- cd $CURDIR
-}
-
-# make screenshot of current desktop (use 'import' from ImageMagic)
-# See man date(1) and man import(1) for details.
-# Note: If you don't have 'import', install ImageMagick and stop
-# crying.
-function sshot()
-{
- [[ ! -d ~/shots ]] && mkdir ~/shots
- cd ~/shots ; sleep 5 ; import -window root -depth 8 -quality 80 `date "+%Y-%m-%d%--%H:%M:%S"`.png
-# cd ~/shots && sleep 5; import -window root `date "+%Y-%m-%d%--%H:%M:%S"`.jpg
-
-}
-
-# Needs ImageMagick
-function gif2png()
-{
- if [[ $# = 0 ]]
- then
- echo "Usage: $0 foo.gif"
- echo "Purpose: change a GIF file to a PNG file"
- else
- output=`basename $1 .gif`.png
- convert $1 $output
- touch -r $1 $output
- ls -l $1 $output
- fi
-}
-
-# search for various types or README file in dir and display them in $PAGER
-# function readme() { $PAGER -- (#ia3)readme* }
-function readme()
-{
- local files
- files=(./(#i)*(read*me|lue*m(in|)ut)*(ND))
- if (($#files))
- then $PAGER $files
- else
- print 'No README files. Please lart \$MAINTAINER!'
- fi
-}
-
-# find all suid files in $PATH
-function suidfind() { ls -latg ${(s.:.)PATH} | grep '^...s' }
-
-# See above but this is /better/ ... anywise ..
-# Note: Add $USER and 'find' with "NOPASSWD" in your /etc/sudoers or run it
-# as root (UID == 0)
-function findsuid()
-{
- sudo find / -type f \( -perm -4000 -o -perm -2000 \) -ls > ~/.suid/suidfiles.`date "+%Y-%m-%d"`.out 2>&1
- sudo find / -type d \( -perm -4000 -o -perm -2000 \) -ls > ~/.suid/suiddirs.`date "+%Y-%m-%d"`.out 2>&1
- sudo find / -type f \( -perm -2 -o -perm -20 \) -ls > ~/.suid/writefiles.`date "+%Y-%m-%d"`.out 2>&1
- sudo find / -type d \( -perm -2 -o -perm -20 \) -ls > ~/.suid/writedirs.`date "+%Y-%m-%d"`.out 2>&1
-}
-
-# csh compatibility
-setenv() { typeset -x "${1}${1:+=}${(@)argv[2,$#]}" }
-
-# if [ Now-Playing == "relaxmusic" ];then .. ;-)
-beer()
-{
- echo " _.._..,_,_"
- echo " ( )"
- echo " ]~,\"-.-~~["
- echo " .=])' (; ([ PANTS OFF!"
- echo " | ]:: ' ["
- echo " '=]): .) (["
- echo " |:: ' |"
- echo " ~~----~~"
-}
-
-# Add directory to a bookmark-list
-# % bmadd # add directory to bookmark list
-# % bmls # show list of bookmark list
-# % bmvi # edit bookmark list
-# % bm $NUMBER # change directory to $NUMBER bookmark
-BMRC=~/.bmrc
-/usr/bin/touch $BMRC
-bmls() { cat $BMRC | sort -n}
-bmvi() { vi $BMRC }
-bmadd() {
- local bmdir=`pwd`
- local newid=$1
- local bmname=''
- for bmname in `bm_path_list`
- do
- if [ "$bmname" = "$bmdir" ]; then
- echo "$bmdir is already in bm list"
- return
- fi
- done
- if [ -z $newid ]; then
- maxid=`cat $BMRC | cut -f 1 | sort -n -r | head -1`
- if [ "$maxid" -ge 1 ]; then
- newid=`expr 0$maxid + 1`
- else
- newid=1
- fi
- fi
- echo "$newid\t$bmdir" >> $BMRC
-}
-bm() {
- local num=$1
- local bmdir=`bm_get $num`
- if [ -z "$bmdir" ]; then
- bmls
- [ -z "$num" ] || echo "$num is not in bm list"
- return
- fi
- cd "$bmdir"
-}
-bm_get() {
- local bmdir=`cat $BMRC | egrep "^${1}[[:space:]]" | cut -f 2`
- echo $bmdir
-}
-
-bm_path_list() {
- cut -f 2 < $BMRC
-}
-
-# Temporary (interactive) removes. Alternative to this u can use
-# http://www.strcat.de/hacks/rm-replacements.shar
-function rf()
-{
- [[ -z ${SHITDIR} ]] && print "No ${SHITDIR} defined." && return 1
- [[ ! -d ${SHITDIR} ]] && mkdir ${SHITDIR}
- mv $* ${SHITDIR}
-}
-
-# Reload functions.
-function refunc()
-{
- for func in $argv
- do
- unfunction $func
- autoload $func
- done
-}
-
-# a small check to see which DIR is located on which server/partition.
-# stolen and modified from Sven's zshrc.forall
-function dirspace()
-{
- for dir in ${(s.:.)PATH};
- do
- (cd $dir; echo "-<$dir>"; du -shx .; echo);
- done
-}
-
-# Create a archive for my homepage (<http://strcat.neessen.net/>)
-function mkz()
-{
- cd ~/homepage/dotfiles/zsh
- cp ~/.zlogin ~/homepage/dotfiles/zsh/zlogin
- cp ~/.zlogout ~/homepage/dotfiles/zsh/zlogout
- cp ~/.zshrc ~/homepage/dotfiles/zsh/zshrc
- cp ~/.zsh/z* ~/homepage/dotfiles/zsh/
- cd ~/homepage/dotfiles/zsh/
- rm ~/homepage/dotfiles/zsh/zshdevel.old
- tar cf dot-zsh.tar *
- gzip --best ~/homepage/dotfiles/zsh/dot-zsh.tar
- cd ~1
-}
-
-# FIXME: works not so as i like
-#--------------------------------------------------
-# function verify() {
-# for i in "$1"
-# do
-# if [ -r "$1" ]
-# then
-# #cd `dirname $1`
-# cd =$1(:h)
-# shortname=`basename $1`
-# md5 "$shortname" > "~/.checksums/$shortname.md5sum"
-# echo "Verified $shortname to $shortname.md5sum"
-# else
-# echo "Can not find $1"
-# fi
-# done
-# }
-#--------------------------------------------------
-
-
-# Find (and print) all symbolic links without a target within the
-# current directorytree (i. e. ll symlinks that dont point to files,
-# directories, sockets, devices, or named pipes).
-# Note: all three functions works but the last is nicer
-# function brlinks() { for i in **/*(D@); [[ -f $i || -d $i ]] || echo $i }
-# function brlinks() { print -l **/*(@-^./=%p) }
-function brlinks() { print -l **/*(-@) }
-
-# *fg*
-# function show_print () {
-# for argument in "${@}"
-# do
-#for ((i = 1; i <= ${#1} ;i++)) {
-# print -n "${argument[i]}"
-# sleep 0.005
-#}
-#print -n " "
-# done
-# print ""
-#}
-
-# display some informations
-function status()
-{
- print ""
- print "Date..: "$(date "+%Y-%m-%d %H:%M:%S")""
- print "Shell.: Zsh $ZSH_VERSION (PID = $$, $SHLVL nests)"
- print "Term..: $TTY ($TERM), $BAUD bauds, $COLUMNS x $LINES cars"
- print "Login.: $LOGNAME (UID = $EUID) on $HOST"
- print "System: $(cat /etc/[A-Za-z]*[_-][rv]e[lr]*)"
- print "Uptime:$(uptime)"
- print ""
-}
-
-# a fucking lazy poor man clock..
-# check time every minute
-# PERIOD=60
-# show time every 15 minutes
-#function periodic()
-#{
-# if [ `date +'%M'` = '00' ] ||
-# [ `date +'%M'` = '15' ] ||
-# [ `date +'%M'` = '30' ] ||
-# [ `date +'%M'` = '45' ]
-# then
-# echo Time: `date +'%H:%M'`
-# fi
-#}
-
-# For my Linux boxes
-if [ ${OS} = linux-gnu ]; then
-function mkernel()
-{
- make clean && make dep && make modules && make modules_install && make bzImage
- cd arch/i386/boot
-}
-
-function getkernel()
-{
- if [ $# -ne 3 ] ; then
- echo "Usage:"
- echo "$0 MAJOR MINOR SUBMINOR"
- echo ""
- echo "eg:"
- echo " $0 2 6 7"
- latest=`echo -e "GET /kdist/finger_banner HTTP/1.0\n" | netcat www.kernel.org 80 | sed -ne "/^\r$/,//p"`
- echo ""
- echo "current versions: $latest"
- echo ""
- echo -n 'Used release is: '
- uname -r
- else
- cd /Source
- SERVER=http://www.de.kernel.org/pub/linux/kernel/
- KERNEL=$SERVER/v$1.$2/linux-$1.$2.$3.tar.bz2
- SIGN=$SERVER/v$1.$2/linux-$1.$2.$3.tar.bz2.sign
- echo 'starting download'
- wget -c $KERNEL &&
- wget -c $SIGN &&
- echo 'done'
- echo 'checking signature:'
- gpg --verify `basename $SIGN $KERNEL` &&
- echo 'done'
- fi
-}
-
-function audiorip()
-{
- mkdir -p ~/ripps
- cd ~/ripps
- cdrdao read-cd --device $DEVICE --driver generic-mmc audiocd.toc
- cdrdao read-cddb --device $DEVICE --driver generic-mmc audiocd.toc
- echo " * Would you like to burn the cd now? (yes/no)"
- read input
- if
- [ "$input" = "yes" ]; then
- echo " ! Burning Audio CD"
- audioburn
- echo " * done."
- else
- echo " ! Invalid response."
- fi
-}
-
-function audioburn()
-{
- cd ~/ripps
- cdrdao write --device $DEVICE --driver generic-mmc audiocd.toc
- echo " * Should I remove the temporary files? (yes/no)"
- read input
- if [ "$input" = "yes" ]; then
- echo " ! Removing Temporary Files."
- cd ~
- rm -rf ~/ripps
- echo " * done."
- else
- echo " ! Invalid response."
- fi
-}
-
-function mkaudiocd()
-{
- cd ~/ripps
- for i in *.[Mm][Pp]3; do mv "$i" `echo $i | tr '[A-Z]' '[a-z]'`; done
- for i in *.mp3; do mv "$i" `echo $i | tr ' ' '_'`; done
- for i in *.mp3; do mpg123 -w `basename $i .mp3`.wav $i; done
- normalize -m *.wav
- for i in *.wav; do sox $i.wav -r 44100 $i.wav resample; done
-}
-
-function mkiso()
-{
- echo " * Volume name "
- read volume
- echo " * ISO Name (ie. tmp.iso)"
- read iso
- echo " * Directory or File"
- read files
- mkisofs -o ~/$iso -A $volume -allow-multidot -J -R -iso-level 3 -V $volume -R $files
-}
-
-# rmmodcomplete() looks for modules in memory, for use with "rmmod".
-rmmodcomplete () { reply=(`/sbin/lsmod|cut -f1 -d" "|grep -v Module`) }
-compctl -K rmmodcomplete rmmod
-
-# insmodcomplete() looks for modules to use with "insmod" or
-# "modprobe".
-function insmodcomplete() { reply=(`find /lib/modules/$(uname -r)/* ! -type d -printf "%f\n"|sed "s/\.o$//"`) }
-compctl -K insmodcomplete insmod modprobe
-
-fi
-
-# Complete a howto-filename or FAQ-name (see howto script below).
-# Use like "howto zsh[TAB]".
-function howtocomplete() { reply=(`howto --find "$1"`) }
-compctl -U -K howtocomplete howto
-p0rncomplete() { reply=(`p0rn --find "$1"`) }
-compctl -U -K p0rncomplete p0rn
-
-# a quick hack for GNU Emacs && emacsclient
-function e()
-{
- if [ "$1" = "" ]; then
- echo "No file specified you have, think before you must."
- else
- if emacsclient -n "$1" >/dev/null 2>&1; then
- echo "Alrite, opened $1 in the Holy Emacs."
- else
- echo "There's no Holy Emacs running here.. starting.."
- exec emacs "$1" &
- fi
- fi
-}
-
-# Show days since given birthday
-function days ()
-{
- if [ "$*" = "" ]; then
- echo "Use $0 day month year"
- echo "Example: $0 "12 aug 1999""
- else
- BIRTHDAY="$*"
- print $(( (`date +%s -d ${2:="now"}` - `date +%s -d ${1:=$BIRTHDAY}` )/60/60/24 ))
- fi
-}
-
-# generate thumbnails ;)
-function genthumbs ()
-{
- rm -rf thumb-* index.html
- echo "
-<html>
- <head>
- <title>Images</title>
- </head>
- <body>" > index.html
- for f in *.(gif|jpeg|jpg|png)
- do
- convert -size 100x200 "$f" -resize 100x200 thumb-"$f"
- echo " <a href=\"$f\"><img src=\"thumb-$f\"></a>" >> index.html
- done
- echo "
- </body>
-</html>" >> index.html
-}
+++ /dev/null
-# ,----
-# | [dope@painless:~]% ulimit -a
-# | -t: cpu time (seconds) 2000
-# | -f: file size (blocks) 500000
-# | -d: data seg size (kbytes) 100000
-# | -s: stack size (kbytes) 8192
-# | -c: core file size (blocks) 0
-# | -m: resident set size (kbytes) unlimited
-# | -u: processes 1791
-# | -n: file descriptors 1024
-# | -l: locked-in-memory size (kb) 50000
-# | -v: address space (kb) unlimited
-# | -N 10: file locks unlimited
-# | [dope@painless:~]%
-# `----
-#
-# Note: This settings protect *not* against 'fork'-bombs like
-# $ (){ :|:&};:
-# $ perl -e 'while(1){ fork();}'
-# but i don't care a pap for it. Trust me. I know what I'm doing. See
-# zshbuiltins(1) /ulimit for details.
-ulimit -c 0 # prevent core files from being written at al
-ulimit -d 100000 # 100 MB data segment
-ulimit -f 500000 # 500 MB file size
-ulimit -l unlimited
-#ulimit -l 50000 # 50 MB locked memory
-ulimit -n 1024 # 1024 open files
-ulimit -s 8192 # 8 kb stack size
-ulimit -t 2000 # 200 sec CPU time
-
-# An array (colon separated list) containing the suffixes of files to
-# be ignored during filename completion. However, if completion only
-# generates files with suffixes in this list, then these files are
-# completed anyway.
-# Note: U can use ``ls **/*~*(${~${(j/|/)fignore}})(.)'' to list all
-# plain files that do not have extensions listed in `fignore'
-fignore=( ,v .aux .toc .lot .lof .blg .bbl .bak .BAK .sav .old .o .trace .swp \~)
-
-# Setting abbreviation like 'iab' with Vim.. YES! Zsh _IS_ evil *hr*. I
-# use this instead of "global aliases".
-# $ Igr<Space>
-# will be expanded to
-# $ groff -s -p -t -e -Tlatin1 -mandoc
-typeset -A myiabs
-myiabs=(
- "Im" "| more"
- "Ig" "| grep"
- "Ieg" "| egrep"
- "Iag" "| agrep"
- "Igr" "groff -s -p -t -e -Tlatin1 -mandoc"
- "Ip" "| $PAGER"
- "Ih" "| head"
- "It" "| tail"
- "Is" "| sort"
- "Iv" "| $EDITOR"
- "Iw" "| wc"
- "Ix" "| xargs"
-)
-my-expand-abbrev() {
- local MATCH
- LBUFFER=${LBUFFER%%(#m)[_a-zA-Z0-9]#}
- LBUFFER+=${myiabs[$MATCH]:-$MATCH}
- zle self-insert
-}
-
-#--------------------------------------------------
-# Now in ~/.zsh/zshbindings
-# bindkey " " my-expand-abbrev
-#--------------------------------------------------
-
-# Set the "umask" (see "man umask"):
-# ie read and write for the owner only.
-# umask 002 # relaxed -rwxrwxr-x
-# umask 022 # cautious -rwxr-xr-x
-# umask 027 # uptight -rwxr-x---
-# umask 077 # paranoid -rwx------
-# umask 066 # bofh-like -rw-------
-umask 066
-
-# If root set unmask to 022 to prevent new files being created group and world writable
-if (( EUID == 0 )); then
- umask 022
-fi
-
-# fucking "dead.letter" *narf*
-if [ -e ~/dead.letter ]; then
- mv ~/dead.letter ~/.dead_letter.`date +%Y%m%d-%R`
-fi
-
-# >painless< is a "what happend if< - box (OpenBSD -current) and *.core -
-# files is a matter of course :>
-if [ "$HOSTNAME" = painless ]; then
- if
- [ -e ${HOME}/{mutt,xmms,zsh,irssi,perl,fvwm,opera}.core ]; then
- zmv -M '(*).core' ~/.Core-Files/'$1.core-`date +%Y%m%d-%S`' && echo "Checkout ~/.Core-Files"
- fi
-fi
-
-# 'hash' often visited directorys
-# Note: That's *not* variables or aliase!
-# ,----
-# | $ hash -d M=~/.mutt
-# | $ M
-# | ~/.mutt
-# | $ echo $M
-# |
-# | $ pwd
-# | /home/dope/.mutt
-# | $
-# `----
-hash -d D=~/download/ # there are my downloads
-hash -d F=/usr/local/share/zsh/$ZSH_VERSION/functions # ZSH functions (OpenBSD)
-hash -d F=/usr/share/zsh/$ZSH_VERSION/functions/ # ZSH functions (Slackware)
-hash -d FD=/backups/Documentations # usefull documentations
-hash -d FDD=/backups/Downloads # /new/ software an own make packages/ports
-hash -d FF=/backups/Files # Pics, movies, ..
-hash -d FS=/backups/System # my local backups
-hash -d H=/backups/ # Backups from this host
-hash -d HJ=~/.jed # $JED_ROOT (${HOME})
-hash -d I=~/.irssi/ # Files for Irssi
-hash -d J=/usr/local/jed/ # $JED_ROOT (Change it!)
-hash -d L=~/.slang/ # Files for Slrn
-hash -d M=~/.mutt/ # Files for Mutt
-hash -d P=~/homepage/ # My personal webpage
-hash -d RC=/etc/rc.d/ # executed files from init (Slackware)
-hash -d S=~/scripts/ # (Un)tested local hacks
-hash -d SO=/backups/Source # Mutt, Slrn, Vim, ..
-hash -d U=/usr/src/linux/ # Linux-Kernel
-hash -d V=~/.vim/ # Files for Vim
-hash -d VL=/var/log # often visited ;)
-hash -d Z=~/.zsh/ # "setupfiles" for ZSH
-hash -d _S=~/.sigs/ # My signature collection
+++ /dev/null
-# These names are case insensitive and underscores are ignored. For
-# example, `allexport' is equivalent to `A__lleXP_ort'.
-
-# Initialisation for new style completion.
-if [[ "$ZSH_VERSION" == (3.1|4)* ]]; then
- autoload -U compinit
- compinit -C
-else
- print "Advanced completion system not found; ignoring zstyle settings."
- function zstyle { }
-fi
-
-#--------------------------------------------------
-# if [[ "$ZSH_VERSION" == 4.2.<0->* ]]; then
-# # If you now paste a url it will be magically quoted!
-# # But it only works on 4.2.0 and later.
-# autoload -U url-quote-magic
-# zle -N self-insert url-quote-magic
-# fi
-#--------------------------------------------------
-
-# This tries to find wordcode files and automatically re-compile them if
-# at least one of the original files is newer than the wordcode file.
- autoload zrecompile
-# This is a multiple move based on zsh pattern matching (like "mmv").
-# Read ``less ${^fpath}/zmv(N)'' for more details
- autoload zmv
-# Edit small files with the command line editor.
- autoload -U zed
-# Like xargs, but instead of reading lines of arguments from standard input,
-# it takes them from the command line. This is possible/useful because,
-# especially with recursive glob operators, zsh often can construct a command
-# line for a shell function that is longer than can be accepted by an external
-# command. This is what's often referred to as the "shitty Linux exec limit" ;)
-# The limitation is on the number of characters or arguments.
-# $ =echo {1..30000}
-# zsh: argument list too long: /bin/echo
-# $ autoload -U zargs
-# $ zargs -- =echo {1..30000}
-# [ long list ;) ]
- autoload -U zargs
-# This autoloadable function checks the folders specified as arguments
-# for new mails.
-# autoload -U checkmail
-# Edit the command line using your usual editor.
-# autoload -U edit-command-line
-
-# This module should be automatically loaded if u use menu selection but
-# to be sure we do it here
- zmodload -i zsh/complist
-# Autoload zsh modules when they are referenced
-# A builtin command interface to the stat system call
- zmodload -a zsh/stat stat
-# A builtin that can clone a running shell onto another terminal.
- zmodload -e zsh/clone
-
-# Watch for logins
-watch=(notme)
-
-# allow me to cd directly into a dir in $PORTS_DIR from anywhere
-# $ cd shells && pwd
-# /usr/ports/shells
-if [ "${OS}" = OpenBSD ]; then
- cdpath=( ${PORTS_DIR} )
-fi
-
-# When listing options (by `setopt', `unsetopt', `set -o' or `set +o'),
-# those turned on by default appear in the list prefixed with `no'.
-# Hence (unless KSH_OPTION_PRINT is set), `setopt' shows all options
-# whose settings are changed from the default.
-#
-# Report the status of background jobs immediately, rather than
-# waiting until just before printing a prompt.
-setopt notify
-
-# Allow comments even in interactive shells i. e.
-# $ uname # This command prints system informations
-# zsh: bad pattern: #
-# $ setopt interactivecomments
-# $ uname # This command prints system informations
-# OpenBSD
-setopt interactivecomments
-
-# Send *not* a HUP signal to running jobs when the shell exits.
-setopt nohup
-
-# Print a carriage return just before printing a prompt in the line
-# editor. For example:
-# $ echo foo
-# foo
-# $ echo -n foo
-# $ setopt nopromptcr
-# $ echo -n foo
-# foo$
-#--------------------------------------------------
-# setopt nopromptcr
-#--------------------------------------------------
-
-# Perform =filename access
-# $ setopt EQUALS
-# $ echo =ls
-# /bin/ls
-# $ unsetopt EQUALS
-# $ echo =ls
-# =ls
-setopt equals
-
-# Beep on an ambiguous completion. More accurately, this forces the
-# completion widgets to return status 1 on an ambiguous completion, which
-# causes the shell to beep if the option BEEP is also set; this may
-# be modified if completion is called from a user-defined widget.
-setopt nolistbeep
-
-# Try to make the completion list smaller (occupying less lines) by
-# printing the matches in columns with different widths.
-setopt list_packed
-
-# Do not exit on end-of-file. Require the use of exit or logout instead.
-# However, ten consecutive EOFs will cause the shell to exit anyway, to
-# avoid the shell hanging if its tty goes away. Also, if this option is
-# set and the Zsh Line Editor is used, widgets implemented by shell
-# functions can be bound to EOF (normally Control-D) without printing
-# the normal warning message. This works only for normal widgets, not
-# for completion widgets.
-#setopt ignore_eof
-
-# if the braces aren't in either of the above forms, expands single
-# letters and ranges of letters, i. e.:
-# $ print 1{abw-z}2
-# $ 1a2 1b2 1w2 1x2 1y2 1z2
-setopt braceccl
-
-# Make the echo builtin compatible with the BSD man page echo(1)
-# command.
-# $ echo "foo\bar\baz"
-# foaaz
-# $ unsetopt bsdecho
-# $ echo "foo\bar\baz"
-# foo\bar\baz
-unsetopt bsdecho
-
-# If the argument to a cd command (or an implied cd with the
-# AUTO_CD option set) is not a directory, and does not begin with a
-# slash, try to expand the expression as if it were preceded by a
-# '~' (see section Filename Expansion).
-setopt cdablevars
-
-# Report the status of background and suspended jobs before exiting a shell
-# with job control; a second attempt to exit the shell will succeed.
-setopt checkjobs
-
-# Make cd push the old directory onto the directory stack.
-setopt autopushd
-
-# change to directory without "cd"
-setopt autocd
-
-# Exchanges the meanings of `+' and `-' when used with a number to
-# specify a directory in the stack.
-setopt pushdminus
-
-# If set, parameter expansion, command substitution and arithmetic
-# expansion are performed in prompts.
-setopt pushdsilent
-
-# Treat the '#', '~' and '^' characters as part of patterns
-# for filename generation, etc. (An initial unquoted '~'
-# always produces named directory expansion.)
-# | $ grep word *~(*.gz|*.bz|*.bz2|*.zip|*.Z)
-# searches for word not in compressed files
-setopt extendedglob
-
-# Do query the user before executing 'rm *' or 'rm path/*'
-# $ rm -rf *
-# zsh: sure you want to delete all the files in /home/dope/foo [yn]?
-setopt normstarsilent
-
-# If querying the user before executing `rm *' or `rm path/*',
-# first wait ten seconds and ignore anything typed in that time.
-# This avoids the problem of reflexively answering `yes' to the query
-# when one didn't really mean it. The wait and query can always be
-# avoided by expanding the `*' in ZLE (with tab).
-setopt no_rm_star_wait
-
-# Shut up ;)
-setopt nobeep
-
-# Beep when an attempt is made to access a history entry which
-# isn't there.
-setopt histbeep
-
-# When writing out the history file, older commands that duplicate newer ones
-# are omitted.
-setopt HISTSAVENODUPS
-
-# When searching for history entries in the line editor, do not display
-# duplicates of a line previously found, even if the duplicates are not
-# contiguous.
-setopt HISTFINDNODUPS
-
-# If the internal history needs to be trimmed to add the current command line,
-# setting this option will cause the oldest history event that has a duplicate
-# to be lost before losing a unique event from the list.
-# You should be sure to set the value of HISTSIZE to a larger number
-# than SAVEHIST in order to give you some room for the duplicated
-# events, otherwise this option will behave just like HIST_IGNORE_ALL_DUPS
-# once the history fills up with unique events.
-setopt hist_expire_dups_first
-
-# If a new command line being added to the history list duplicates an
-# older one, the older command is removed from the list (even if it is
-# not the previous event).
-setopt hist_ignore_all_dups
-
-# Do not enter command lines into the history list
-# if they are duplicates of the previous event.
-setopt hist_ignore_dups
-
-# Remove command lines from the history list when the first character on
-# the line is a space, or when one of the expanded aliases contains a
-# leading space.
-# Note that the command lingers in the internal history until the next
-# command is entered before it vanishes, allowing you to briefly reuse
-# or edit the line. If you want to make it vanish right away without
-# entering another command, type a space and press return.
-setopt hist_ignore_space
-
-# HIST_REDUCE_BLANKS
-# Remove superfluous blanks from each command line
-# being added to the history list.
-setopt hist_reduce_blanks
-
-# Whenever the user enters a line with history expansion,
-# don't execute the line directly; instead, perform
-# history expansion and reload the line into the editing buffer.
-setopt hist_verify
-
-# Remove function definitions from the history list.
-# Note that the function lingers in the internal history until the next
-# command is entered before it vanishes, allowing you to briefly reuse
-# or edit the definition.
-#setopt hist_no_functions
-
-# Remove the history (fc -l) command from the history list
-# when invoked.
-# Note that the command lingers in the internal history until the next
-# command is entered before it vanishes, allowing you to briefly reuse
-# or edit the line.
-setopt hist_no_store
-
-# If this is set, zsh sessions will append their history list to
-# the history file, rather than overwrite it. Thus, multiple parallel
-# zsh sessions will all have their history lists added to the
-# history file, in the order they are killed
-setopt appendhistory
-
-# If unset, the cursor is set to the end of the word if completion is
-# started. Otherwise it stays there and completion is done from both ends.
-setopt completeinword
-
-# When listing files that are possible completions, show the
-# type of each file with a trailing identifying mark.
-setopt list_types
-
-# Do not require a leading '.' in a filename to be matched explicitly.
-setopt globdots
-
-# Try to correct the spelling of all arguments in a line.
-setopt correctall
-
-# List jobs in the long format by default.
-setopt longlistjobs
-
-# Print eight bit characters literally in completion lists, etc.
-# This option is not necessary if your system correctly returns the
-# printability of eight bit characters (see man page ctype(3)).
-setopt printeightbit
-
-# Don't push multiple copies of the same directory onto the directory
-# stack
-setopt pushdignoredups
-
-# This option both imports new commands from the history file, and also
-# causes your typed commands to be appended to the history file (the
-# latter is like specifying INC_APPEND_HISTORY).
-# The history lines are also output with timestamps ala
-# EXTENDED_HISTORY (which makes it easier to find the spot where
-# we left off reading the file after it gets re-written).
-setopt sharehistory
-
-# Try to correct the spelling of all arguments in a line.
-# No .. not really .. it's make me crazy *g*
-# setopt correctall
-
-# Save each command's beginning timestamp (in seconds since the epoch)
-# and the duration (in seconds) to the history file. The format of
-# this prefixed data is:
-# ':<beginning time>:<elapsed seconds>;<command>'.
-# i. e.:
-# : 1054961691:0;/usr/games/fortune -f
-setopt EXTENDEDHISTORY
-
-# Allow the short forms of for, select, if, and function constructs, i.
-# e.: ``for i (*.o) rm $i'' instead of ``for i in *.o; do rm $i; done''
-setopt shortloops
-
-# Do *not* run all background jobs at a lower priority
- unsetopt bgnice
-# If this option is unset, output flow control via start/stop characters
-# (usually assigned to ^S/^Q) disabled in the shell's editor.
- unsetopt flow_control
+++ /dev/null
-# $Id: .zshrc,v 1.17 2003/07/03 18:51:22 dope Exp dope $
-#
-# README!
-#
-# Filename : ~/.zshrc
-# Purpose : setup file for the shell 'zsh'
-# Author : Christian Schneider <strcat@gmx.net>
-# Homepage : http://www.strcat.de/zsh/
-# Latest release : <http://strcat.neessen.net/dotfiles/#zsh>
-# Needed files : <http://strcat.neessen.net/dotfiles/zsh/dot-zsh.tar.gz>>
-#
-# Structure of this file:
-# Lines starting with '#' are comments.
-#
-# Take a quick (haha) look on zshbuiltins(1), zshcompwid(1),
-# zshcompsys(1), zshcompctl(1), zshexpn(1), zshmisc(1), zshmodules(1),
-# zshoptions(1), zshparam(1), zshzle(1) or - for hardliner -
-# zshall(1).
-# ,----[ Overview (Zsh 4.2.1) ]
-# | [dope@dreckskind:~]% man -k zsh
-# | zsh (1) - the Z shell (330 lines)
-# | zshall (1) - the Z shell meta-man page (18348 lines)
-# | zshcompwid (1) - zsh completion widgets (1320 lines)
-# | zshcompsys (1) - zsh completion system (3432 lines)
-# | zshzftpsys (1) - zftp function front-end (858 lines)
-# | zshbuiltins (1) - zsh built-in commands (1716 lines)
-# | zshoptions (1) - zsh options (1254 lines)
-# | zshzle (1) - zsh command line editor (1320 lines)
-# | zshparam (1) - zsh parameters (1056 lines)
-# | zshmodules (1) - zsh loadable modules (2442 lines)
-# | zshmisc (1) - everything and then some (1782 lines)
-# | zshcompctl (1) - zsh programmable completion (858 lines)
-# | zshexpn (1) - zsh expansion and substitution (1914 lines)
-# `----
-#
-# Zsh start up sequence:
-# 1) /etc/zshenv -> Always run for every zsh. (login + interactive + other)
-# 2) ~/.zshenv -> Usually run for every zsh. (login + interactive + other)
-# 3) /etc/zprofile -> Run for login shells. (login)
-# 4) ~/.zprofile -> Run for login shells. (login)
-# 5) /etc/zshrc -> Run for interactive shells. (login + interactive)
-# 6) ~/.zshrc -> Run for interactive shells. (login + interactive)
-# 7) /etc/zlogin -> Run for login shells. (login)
-# 8) ~/.zlogin -> Run for login shells. (login)
-#
-# Last modified: [ 2004-09-15 02:43:09 ]
-#
-#
-# THIS FILE IS NOT INTENDED TO BE USED AS /etc/zshrc, NOR WITHOUT
-# EDITING!
-#
-# This file is based on ideas of:
-# Sven Guckes...: <http://www.guckes.net/setup/zshrc>
-# Michael Prokop: <http://www.michael-prokop.at/computer/config/.zshrc>
-# Marijan Peh...: <http://free-po.hinet.hr/MarijanPeh/files/zshrc>
-# Adam Spiers...: <http://adamspiers.org/computing/shells/>
-#
-# Tested and used unter {Net,Open}BSD, Slackware, Gentoo and LFS
-# with Zsh 4.0.7, 4.0.9, 4.1.1, 4.2.0 and 4.2.1
-
-# Login shell? If you want to know, you can type the following which will
-# do nothing it's a login shell or warn you if not.
-#--------------------------------------------------
-# if [[ ! -o login ]]; then
-# print "Warning: It is *not* a login-Shell\!"
-# fi
-#--------------------------------------------------
-
-# -f true if file exists and is a regular file. See
-# | man zshmisc | less -p "^CONDITIONAL EXPRESSIONS"
-# for details.
-#
-# Test and then source exported variables.
-if [ -f ~/.zsh/zshexports ]; then
- source ~/.zsh/zshexports
-else
- print "Note: ~/.zsh/zshexports is unavailable."
-fi
-
-# painless is my "what-happend-when" - box (for debugging and so on)
-if [ ${HOSTNAME} = painless ] && [ -e ~/.zsh/zshdevel ]; then
- source ~/.zsh/zshdevel
-fi
-
-# Test and then source some options
-if [ -f ~/.zsh/zshoptions ]; then
- source ~/.zsh/zshoptions
-else
- print "Note: ~/.zsh/zshoptions is unavailable."
-fi
-
-# Test and then source alias definitions.
-if [ -f ~/.zsh/zshaliases ]; then
- source ~/.zsh/zshaliases
-else
- print "Note: ~/.zsh/zshaliases is unavailable."
-fi
-
-# Test and then source the functions.
-if [ -f ~/.zsh/zshfunctions ]; then
- source ~/.zsh/zshfunctions
-else
- print "Note: ~/.zsh/zshfunctions is unavailable."
-fi
-
-# Test and then source the lineeditor
-if [ -f ~/.zsh/zshzle ]; then
- source ~/.zsh/zshzle
-else
- print "Note: ~/.zsh/zshzle is unavailable."
-fi
-
-# Test and then source the "Statusbar-Functions"
-#--------------------------------------------------
-# if [ -f ~/.zsh/zshstatusbar ];then
-# source ~/.zsh/zshstatusbar
-# else
-# print "Note: ~/.zsh/zshstatusbar is unavailable."
-# fi
-#--------------------------------------------------
-
-# Test and then source the keybindings
-if [ -f ~/.zsh/zshbindings ]; then
- source ~/.zsh/zshbindings
-else
- print "Note: ~/.zsh/zshbindings is not available."
-fi
-
-# Test and then source the completionsystem
-if [ -f ~/.zsh/zshcompctl ]; then
- source ~/.zsh/zshcompctl
-else
- print "Note: ~/.zsh/zshcompctl is unavailable."
-fi
-
-# Test and then source the zstyles
-if [ -f ~/.zsh/zshstyle ]; then
- source ~/.zsh/zshstyle
-else
- print "Note: ~/.zsh/zshstyle is unavailable."
-fi
-
-# Test and then source the wretched rest
-if [ -f ~/.zsh/zshmisc ]; then
- source ~/.zsh/zshmisc
-else
- print "Note: ~/.zsh/zshmisc is unavailable."
-fi
+++ /dev/null
-# Posted by Thomas Köhler on the Zsh-Mailinglist (since ~1999)
-#
-# vi mode extensions
-redisplay() {
- builtin zle .redisplay
- ( true ; show_mode "INSERT") &!
-}
-redisplay2() {
- builtin zle .redisplay
- (true ; show_mode "COMMAND") &!
-}
-screenclear () {
- echo -n "\033[2J\033[400H"
- builtin zle .redisplay
- (true ; show_mode "INSERT") &!
-}
-
-screenclearx () {
- repeat 2 print
- local MYLINE="$LBUFFER$RBUFFER"
- highlight $MYLINE
- repeat 4 print
- builtin zle redisplay
-}
-show_mode() {
- local COL
- local x
- COL=$[COLUMNS-3]
- COL=$[COL-$#1]
- x=$(echo $PREBUFFER | wc -l )
-# x=$[x+1]
- x=$[x+0]
- echo -n "\e7\e[$x;A\e[0;G"
- echo -n ""
- echo -n "\e[0;37;44m--$1--\e[0m"
- echo -n "\e8"
-}
-
-# vi-add-eol
-# Move to the end of the line and enter insert mode.
-vi-add-eol() {
- show_mode "INSERT"
- builtin zle .vi-add-eol
-}
-
-# vi-add-next
-# Enter insert mode after the current cursor position, without changing lines.
-vi-add-next() {
- show_mode "INSERT"
- builtin zle .vi-add-next
-}
-
-# vi-change
-# Read a movement command from the keyboard, and kill from the
-# cursor position to the endpoint of the movement. Then enter
-# insert mode. If the command is vi-change.
-vi-change() {
- show_mode "INSERT"
- builtin zle .vi-change
-}
-
-# vi-change-eol
-# Kill to the end of the line and enter insert mode.
-vi-change-eol() {
- show_mode "INSERT"
- builtin zle .vi-change-eol
-}
-
-# vi-change-whole-line
-# Kill the current line and enter insert mode.
-vi-change-whole-line() {
- show_mode "INSERT"
- builtin zle .vi-change-whole-line
-}
-
-# vi-insert
-# Enter insert mode.
-vi-insert() {
- show_mode "INSERT"
- builtin zle .vi-insert
-}
-
-# vi-insert-bol
-# Move to the first non-blank character on the line and enter insert mode.
-vi-insert-bol() {
- show_mode "INSERT"
- builtin zle .vi-insert-bol
-}
-
-# vi-open-line-above
-# Open a line above the cursor and enter insert mode.
-vi-open-line-above() {
- show_mode "INSERT"
- builtin zle .vi-open-line-above
-}
-
-# vi-open-line-below
-# Open a line below the cursor and enter insert mode.
-vi-open-line-below() {
- show_mode "INSERT"
- builtin zle .vi-open-line-below
-}
-
-# vi-substitute
-# Substitute the next character(s).
-vi-substitute() {
- show_mode "INSERT"
- builtin zle .vi-substitute
-}
-
-#vi-replace
-# Enter overwrite mode.
-vi-replace() {
- show_mode "REPLACE"
- builtin zle .vi-replace
-}
-
-# vi-cmd-mode
-# Enter command mode; that is, select the `vicmd' keymap. Yes,
-# this is bound by default in emacs mode.
-vi-cmd-mode() {
- show_mode "COMMAND"
- builtin zle .vi-cmd-mode
-}
+++ /dev/null
-# 'zstyle' (Defines the given style for the pattern)
-# Normally, the completion code will not produce the directory names
-# '.' and '..' as possible completions. If this style is set to
-# 'true', it will add both '.' and '..' as possible completions; if it
-# is set to '..', only '..' will be added.
-# zstyle ':completion:*' special-dirs .. # Fnord
-zstyle -e ':completion:*' special-dirs '[[ $PREFIX = (../)#(|.|..) ]] && reply=(..)'
-
-# add colors to completions
-# general completion
- zstyle ':completion:*:descriptions' format $'%{\e[0;33m%}%d:%{\e[0m%}'
- zstyle ':completion:*' select-prompt %SScrolling active: current selection at %P Lines: %m
- zstyle ':completion:*:corrections' format $'%{\e[0;31m%}%d (errors: %e)%}'
- zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
-# hosts (background = red, foreground = black)
- zstyle ':completion:*:*:*:*:hosts' list-colors '=*=30;41'
-# usernames (background = white, foreground = blue)
- zstyle ':completion:*:*:*:*:users' list-colors '=*=34;47'
-# If the zsh/complist module is loaded, this style can be used to set
-# color specifications. This mechanism replaces the use of the
-# ZLS_COLORS and ZLS_COLOURS parameters.
-# PIDs (bold red)
- zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
- zstyle ':completion:*:*:kill:*' menu yes select
- zstyle ':completion:*:kill:*' force-list always
-
-# I'm bonelazy ;) Complete the hosts and - last but not least - the remote
-# directories. Try it:
-# $ scp file username@<TAB><TAB>:/<TAB>
-zstyle ':completion:*:(ssh|scp|ftp):*' hosts $hosts
-zstyle ':completion:*:(ssh|scp|ftp):*' users $users
-
-# Not realy needed.
-# $ cd <TAB>
-# Komplettiere local directory
-# <list existing directorys>
-# zstyle ':completion:*' format 'Komplettiere %d'
-
-# Don't complete backup files as executables
-zstyle ':completion:*:complete:-command-::commands' ignored-patterns '*\~'
-
-# determine in which order the names (files) should be
-# listed and completed when using menu completion.
-# `size' to sort them by the size of the file
-# `links' to sort them by the number of links to the file
-# `modification' or `time' or `date' to sort them by the last modification time
-# `access' to sort them by the last access time
-# `inode' or `change' to sort them by the last inode change time
-# `reverse' to sort in decreasing order
-# If the style is set to any other value, or is unset, files will be
-# sorted alphabetically by name.
-zstyle ':completion:*' file-sort name
-
-# how many completions switch on menu selection
-# use 'long' to start menu compl. if list is bigger than screen
-# or some number to start menu compl. if list has that number
-# of completions (or more).
-zstyle ':completion:*' menu select=long
-
-# If there are more than 5 options, allow selecting from a menu with
-# arrows (case insensitive completion!).
-zstyle ':completion:*-case' menu select=5
-
-# don't complete backup files as executables
-zstyle ':completion:*:complete:-command-::commands' ignored-patterns '*\~'
-
-# filename suffixes to ignore during completion (except after rm
-# command)
-zstyle ':completion:*:*:(^rm):*:*files' ignored-patterns '*?.(o|c~|old|pro|zwc)' '*~'
-
-# Messages/warnings format
-zstyle ':completion:*:messages' format $'%{\e[0;31m%}%d%{\e[0m%}'
-zstyle ':completion:*:warnings' format $'%{\e[0;31m%}No matches for: %d%{\e[0m%}'
-zstyle ':completion:*:corrections' format $'%{\e[0;31m%}%d (errors: %e)%{\e[0m%}'
-zstyle ':completion:*' group-name ''
-
-# completions for some progs. not in default completion system
-zstyle ':completion:*:*:mpg123:*' file-patterns '*.(mp3|MP3):mp3\ files *(-/):directories'
-zstyle ':completion:*:*:ogg123:*' file-patterns '*.(ogg|OGG):ogg\ files *(-/):directories'
-
-# Prevent CVS files/directories from being completed
-zstyle ':completion:*:(all-|)files' ignored-patterns '(|*/)CVS'
-zstyle ':completion:*:cd:*' ignored-patterns '(*/)#CVS'
-
-# Ignore completion functions for commands you don't have:
-zstyle ':completion:*:functions' ignored-patterns '_*'
-
-# allow one error for every three characters typed in approximate
-# completer
-zstyle -e ':completion:*:approximate:*' max-errors 'reply=( $((($#PREFIX+$#SUFFIX)/3 )) numeric )'
-
-# offer indexes before parameters in subscripts
-zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
-
-# insert all expansions for expand completer
-zstyle ':completion:*:expand:*' tag-order all-expansions
+++ /dev/null
-# Edit the command line using your usual editor.
- zle -N edit-command-line
-# Setting abbreviation like 'iab' with Vim
- zle -N my-expand-abbrev
-# Needed for my "Vim-like statusline". See ~/.zsh/zshstatusbar for
-# details.
-# zle -N redisplay
-# zle -N redisplay2
-# zle -N screenclear
-# zle -N screenclearx
-# zle -N vi-add-eol
-# zle -N vi-add-next
-# zle -N vi-change
-# zle -N vi-change-eol
-# zle -N vi-change-whole-line
-# zle -N vi-insert
-# zle -N vi-insert-bol
-# zle -N vi-open-line-above
-# zle -N vi-open-line-below
-# zle -N vi-substitute
-# zle -N vi-replace
-# zle -N vi-cmd-mode
+++ /dev/null
-
-### put all of this in .zshrc or try ". ~/zsh/klammer.zsh" in .zshrc
-
-COLORX="\e[0;31;47m"
-COLOR0="\e[0m"
-COLOR1="\e[0;30;41m"
-COLOR2="\e[0;30;42m"
-COLOR3="\e[0;30;43m"
-COLOR4="\e[0;30;44m"
-COLOR5="\e[0;30;45m"
-COLOR6="\e[0;30;46m"
-COLOR7="\e[0;30;47m"
-COLOR8="\e[0;34;41m"
-COLOR9="\e[0;34;43m"
-COLOR10="\e[0;37;44m"
-COLOROFF="\e[0m"
-
-
-highlight() {
- line=$*
- i=0
- j=0
- strlen=$#line
- while [ $i -le $strlen ] ; do
- i=$[i+1]
- x=$line[$i]
- case $x in
- (\{) j=$[j+1] ; eval print -n $"COLOR$j"$"x"$"COLOROFF" ;;
- (\}) eval print -n $"COLOR$j"$"x"$"COLOROFF" ; j=$[j-1] ;;
- (*) print -n $x ;;
- esac
- done
- print $COLOROFF
-}
-
-screenclearx () {
- print -n '\e7'
- print
- local MYLINE="$LBUFFER$RBUFFER"
- highlight $MYLINE
- print -n '\e8'
-# print "${COLORX}Hit Enter to continue${COLOROFF}"
-# read -k
-}
-zle -N screenclearx
-bindkey "^Xl" screenclearx
+++ /dev/null
-# a watch for the prompt
-# I have a multiline prompt, so beware!
-# you may need to adjust the parameters
-trap CRON ALRM
-TMOUT=1
-CRON() {
- STRING=$(date)
- # to right adjust the date: How many columns does our terminal
- # have? Reduce by the length of $STRING+5
- COL=$[COLUMNS-5]
- COL=$[COL-$#STRING]
- # Store the current cursor position; jump up two lines; jump to
- # columns $COL
- echo -n "\e7\e[2;A\e[$COL;G"
- echo -n ""
- # echo the date
- echo -n "\e[0;37;44m-- $STRING --\e[0m"
- # restore cursor position
- echo -n "\e8"
-}
-
+++ /dev/null
-### OPTIONS
-setopt completeinword
-setopt no_always_last_prompt
-setopt rm_star_silent
-setopt automenu
-setopt extended_glob
-setopt autopushd
-setopt nobgnice
-setopt hist_ignore_all_dups
-setopt sharehistory
-unsetopt promptcr
-### path history
-DIRSTACKSIZE=15
-setopt autopushd pushdminus pushdsilent pushdtohome
-setopt autolist
-setopt extendedglob
-
-
-### ALIASES
-alias dh="dirs -v"
-# I used to use xv to often...
-alias xv="gqview -l"
-alias run-help=man
-alias lterm="export TERM=linux"
-alias ll="ls -al --color"
-alias ls="ls --color"
-alias l="ls -a --color"
-#alias ll="/bin/ls -al"
-#alias ls="/bin/ls"
-#alias l="/bin/ls -a"
-# export LYNX_CFG=~/.lynxrc
-alias lynx="noglob command lynx -cfg=~/.lynxrc"
-
-### ENVIRONMENT VARIABLES
-LC_COLLATE=C ; export LC_COLLATE
-MAILCHECK=86400
-# export LANG=de_DE@euro
-export LANG=de_DE
-export LC_MESSAGES=en_US
-
-export ORACLE_HOME=/home/oracle/OraHome1
-# export ORACLE_SID=whatever
-
-COLORX="\e[0;31;47m"
-COLOR0="\e[0m"
-COLOR1="\e[0;30;41m"
-COLOR2="\e[0;30;42m"
-COLOR3="\e[0;30;43m"
-COLOR4="\e[0;30;44m"
-COLOR5="\e[0;30;45m"
-COLOR6="\e[0;30;46m"
-COLOR7="\e[0;30;47m"
-COLOR8="\e[0;34;41m"
-COLOR9="\e[0;34;43m"
-COLOR10="\e[0;37;44m"
-COLOROFF="\e[0m"
-
-red='%{\e[0;31m%}'
-white_on_blue='%{\e[0;37;44m%}'
-green='%{\e[0;32m%}'
-yellow='%{\e[0;33m%}'
-blue='%{\e[0;34m%}'
-magenta='%{\e[0;35m%}'
-cyan='%{\e[0;36m%}'
-nocolor='%{\e[0m%}'
-
-ZDOTDIR="$HOME/.zsh"
-
-if [ "$TERM" = "xterm-debian" ] ; then
- chpwd () {
- echo -n "\e]2;$LOGNAME@$(hostname): $(pwd)\a"
- }
-fi
-
-PROMPT2='%_> '
-RPROMPT='%{\e[0;33m%}%1v%{\e[0m%}'
-
-export HISTFILE=~/.zshhistory
-export HISTSIZE=500
-export SAVEHIST=500
-export NNTPSERVER=picard.franken.de
-###
-export PATH="/usr/lib/compilercache:$JAVA_HOME/bin:/home/tkoehler/bin:/usr/local/bin/X11:/usr/local/bin:/bin:/usr/X11R6/bin:/usr/bin:/usr/sbin:/usr/bin/X11:/local/bin:/usr/games:/usr/lib/mutt:${ORACLE_HOME}/bin:/usr/lib/ICAClient:/usr/local/sap/SAPGUI/6.30/bin"
-
-VIM=/usr/local/share/vim
-echo ~VIM >/dev/null
-
-# alias JAVA_HOME="export JAVA_HOME=/usr/lib/jdk1.1/"
-export JAVA_HOME=/usr/local/java/j2sdk1.4.2_01
-
-## SAP
-#### PLATINHOME="/usr/local/sap/SAPGUI/6.30/"
-PLATIN_JAVA="/usr/local/java/j2sdk1.4.2_01/bin/java"
-PLATIN_JAVA_VER=1.4.2
-### export PLATINHOME PLATIN_JAVA PLATIN_JAVA_VER
-export PLATIN_JAVA PLATIN_JAVA_VER
-export EDITOR=/usr/local/bin/vim
-export SLANG_EDITOR="/usr/local/bin/vim %s"
-
-export MOZILLA_HOME="/usr/local/netscape"
-
-export QTDIR PATH MANPATH LD_LIBRARY_PATH LIBRARY_PATH
-export CPLUS_INCLUDE_PATH
-
-export IRCNAME="http://jeanluc-picard.de/irc.html"
-export PAGER=less
-
-export LD_LIBRARY_PATH=/home/tkoehler/lib:/home/oracle/OraHome1/lib/
-
-# export LESS
-
-
-export ZLS_COLOURS
-ZLS_COLOURS="no=36;40:fi=36;40:di=32;40:ln=33;40:pi=31;40:so=22;40:bd=44;37:cd=44;37:ex=35;40:mi=36;40:lc=\e[:rc=m:mi=37;41"
-LS_COLORS=$ZLS_COLOURS
-export LS_COLORS
-#### muß mal noch rausfinden, warum die hier in ganz neuen zsh-Versionen nicht
-#### mehr so tun...
-export ZLS_COLOURS
-# no 0 for normal text (i.e. when displaying something
-# other than a matched file)
-# fi 0 for regular files
-# di 32 for directories
-# ln 36 for symbolic links
-# pi 31 for named pipes (FIFOs)
-# so 33 for sockets
-# bd 44;37
-# for block devices
-# cd 44;37
-# for character devices
-# ex 35 for executable files
-# mi none
-# for non-existent file (default is the value defined
-# for fi)
-# lc \e[ for the left code (see below)
-# rc m for the right code
-# ec none
-# for the end code
-MANPATH=/usr/man:/usr/share/man:/usr/X11R6/man:/usr/local/man
-
-### cool
-export REPORTTIME=3
-
-### FUNCTIONS
-x() { a=$1 ; shift ; echo "$@" | xargs $a }
-prepare_ssh() {
- if [ -f $HOME/.ssh/agent_var ] ; then
- . $HOME/.ssh/agent_var
- else
- SSH_AGENT_PID=1
- fi
- if kill -0 $SSH_AGENT_PID ; then
- :
- else
- eval `ssh-agent`
- ssh-add $HOME/.ssh/id_rsa
- touch $HOME/.ssh/agent_var ; chmod 600 $HOME/.ssh/agent_var
- echo "export SSH_AGENT_PID=$SSH_AGENT_PID" > $HOME/.ssh/agent_var
- echo "export SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> $HOME/.ssh/agent_var
- fi
-}
-
-if [ -z "$SSH_AGENT_PID" ] ; then
- prepare_ssh
-fi
-
-archive_this_dir() {
- if [ -z "$1" ] ; then
- echo "Usage: archive_this_dir LABEL"
- return 1
- fi
- ARCHIVE_TO_CD $1 $PWD 0xEA8CFEDE
-}
-
-archive_this_dir_as_pics() {
- if [ -z "$1" ] ; then
- echo "Usage: archive_this_dir_as_pics LABEL"
- return 1
- fi
- ARCHIVE_PICTURES_TO_CD $1 $PWD 0xEA8CFEDE
-}
-
-gpg_recv_key() {
- gpg --keyserver wwwkeys.pgp.net --keyserver-options honor-http-proxy --recv-keys $@
-}
-
-### highlight current line's {} pairs
-### yes, this functions doesn't work correct in all situations,
-### but it's a nice thing
-highlight() {
- line=$*
- i=0
- j=0
- strlen=$#line
- while [ $i -le $strlen ] ; do
- i=$[i+1]
- x=$line[$i]
- case $x in
- (\{) j=$[j+1] ; eval print -n $"COLOR$j"$"x"$"COLOROFF" ;;
- (\}) eval print -n $"COLOR$j"$"x"$"COLOROFF" ; j=$[j-1] ;;
- (*) print -n $x ;;
- esac
- done
- print $COLOROFF
-}
-
-NEW() {
- vim -c "se tw=70" `date +%Y%m%d-%R`.txt
-}
-
-### set xterm's icon text, its titletext, or both at once
-seticontext() {
- print "\033]1;$@\007"
-}
-settitletext() {
- print "\033]2;$@\007"
-}
-settitle() {
- print "\033]0;$@\007"
-}
-
-### a function for setting up proxy settings
-set_proxy() {
-export http_proxy="http://proxy:3128"
-export https_proxy="http://proxy:3128"
-export ftp_proxy="http://proxy:3128"
-}
-
-namedir () { eval "$1=$PWD" ; eval "echo ~$1" }
-
-### run help on a vim help topic
-vimhelp () { vim -c "help $1" -c on -c "au! VimEnter *" }
-gvimhelp () { gvim -c "help $1" -c on -c "au! VimEnter *" }
-
-acroread() {
- LANG=C command acroread $@
-}
-galeon() {
- LANG=de_DE command galeon $@
-}
-aumix() {
- LANG=en command aumix $@
-}
-function startx() {
- command startx "$@" >& ~/.startx.out
-}
-
-
-function precmd {
-# echo -n "\e]2;$LOGNAME@$(hostname): $(pwd)\a"
-# if [ "$TERM" = "screen-w" ] ; then
-# perl ~/bin/screen_hardstatus.pl $MYTTY $USER $HOST &!
-# PROMPT=$(perl ~/bin/screen_hardstatus.pl " " $USER $HOST $ZSH_VERSION)
- apm=$(apm|sed -e 's/%/%%/')
- PROMPT="${green}$(uptime) $nocolor
-${white_on_blue}--INSERT--${cyan} zsh version: $ZSH_VERSION $yellow Return Code: %? $nocolor
-$blue%h $red%n@%m ${yellow}TTY:%l$cyan - $apm
-$cyan%~>$nocolor "
- # PROMPT="$PROMPT$WHO\n"
-# fi
-
- case "$jobstates" in
- (*running*suspended*)
- psvar[1]="There are running and stopped jobs.";;
- (*suspended*running*)
- psvar[1]="There are running and stopped jobs.";;
- (*suspended*)
- psvar[1]="There are stopped jobs.";;
- (*running*)
- psvar[1]="There are running jobs.";;
- (*)
- psvar[1]="";;
- esac
-}
-
-# pipe jobs to less
-jless() {
- typeset -x -A tmpstates
- for i in $jobstates[(I)*]
- do
- tmpstates[$i]=$jobstates[$i]
- done
- for i in $tmpstates[(I)*]
- do
- echo "[$i]\t$tmpstates[$i]"
- done | sort -n | less
- unset tmpstates
-}
-
-function dmalloc { eval `command dmalloc -b $*` }
-
-### KEY BINDINGS
-# vi keybindings
-bindkey -v
-
-bindkey "\e[A" history-beginning-search-backward
-bindkey "\e[B" history-beginning-search-forward
-bindkey "\e[C" forward-char
-bindkey "\e[D" backward-char
-bindkey "^Xq" push-line
-bindkey "^Xr" history-incremental-search-backward
-bindkey "^Xs" history-incremental-search-forward
-bindkey "^X_" insert-last-word
-bindkey "^Xa" accept-and-hold
-bindkey "^X^H" run-help
-bindkey "^Xh" _complete_help
-bindkey "^I" expand-or-complete
-bindkey "^E" expand-word
-bindkey "^N" menu-complete
-bindkey "^P" reverse-menu-complete
-bindkey -M vicmd "^R" redo
-bindkey -M vicmd "u" undo
-bindkey -M vicmd "ga" what-cursor-position
-
-
-### VI MODE EXTENSIONS
-redisplay() {
- builtin zle .redisplay
-# L=$[LINES - 1]
-# echo -n "\033[$L;0;H"
- ( true ; show_mode "INSERT") &!
-}
-redisplay2() {
- builtin zle .redisplay
-# L=$[LINES - 1]
-# echo -n "\033[$L;0;H"
- (true ; show_mode "NORMAL") &!
-}
-zle -N redisplay
-zle -N redisplay2
-bindkey -M viins "^X^R" redisplay
-bindkey -M vicmd "^X^R" redisplay2
-
-screenclear () {
- echo -n "\033[2J\033[400H"
-#repeat $[LINES - 2] echo
- builtin zle .redisplay
-# builtin zle .clear-screen
- (true ; show_mode "INSERT") &!
-}
-zle -N screenclear
-bindkey "\f" screenclear
-
-screenclearx () {
- # print -n '\e7'
- repeat 2 print
- local MYLINE="$LBUFFER$RBUFFER"
- highlight $MYLINE
- repeat 4 print
- builtin zle redisplay
- # print -n '\e8'
-# print "${COLORX}Hit Enter to continue${COLOROFF}"
-# read -k
-}
-zle -N screenclearx
-bindkey "^Xl" screenclearx
-#bindkey "^L" screenclearx
-
-
-
-show_mode() {
- local COL
- local x
- COL=$[COLUMNS-3]
- COL=$[COL-$#1]
- #x=$(wc -l $PREBUFFER)
- x=$(echo $PREBUFFER | wc -l )
- x=$[x+1]
-# echo -n "\e7\e[0;$COL;H"
- echo -n "\e7\e[$x;A\e[0;G"
- echo -n ""
-# c='`'
-# echo -n "\e7\e[5A\e[0$c"
- echo -n "\e[0;37;44m--$1--\e[0m"
- echo -n "\e8"
-}
-
-### vi-add-eol (unbound) (A) (unbound)
-### Move to the end of the line and enter insert mode.
-
-vi-add-eol() {
- show_mode "INSERT"
- builtin zle .vi-add-eol
-}
-zle -N vi-add-eol
-bindkey -M vicmd "A" vi-add-eol
-
-### vi-add-next (unbound) (a) (unbound)
-### Enter insert mode after the current cursor posi
-### tion, without changing lines.
-
-vi-add-next() {
- show_mode "INSERT"
- builtin zle .vi-add-next
- # OLDLBUFFER=$LBUFFER
- # OLDRBUFFER=$RBUFFER
- # NNUMERIC=$NUMERIC
- # bindkey -M viins "\e" vi-cmd-mode-a
-}
-zle -N vi-add-next
-bindkey -M vicmd "a" vi-add-next
-
-#vi-cmd-mode-a() {
-# show_mode "NORMAL"
-# STRING="LLBUFFER=\${LBUFFER:s/$OLDLBUFFER//}"
-# eval $STRING
-# STRING="RRBUFFER=\${RBUFFER:s/$OLDRBUFFER/}"
-# eval $STRING
-# INS="$LLBUFFER$RRBUFFER"
-# LBUFFER=$OLDLBUFFER
-# repeat $NNUMERIC LBUFFER="$LBUFFER$INS"
-# builtin zle .vi-cmd-mode
-# unset LLBUFFER RRBUFFER NNUMERIC INS
-# bindkey -M viins "\e" vi-cmd-mode
-#}
-#zle -N vi-cmd-mode-a
-
-### vi-change (unbound) (c) (unbound)
-### Read a movement command from the keyboard, and kill
-### from the cursor position to the endpoint of the
-### movement. Then enter insert mode. If the command
-### is vi-change, change the current line.
-
-vi-change() {
- show_mode "INSERT"
- builtin zle .vi-change
-}
-zle -N vi-change
-bindkey -M vicmd "c" vi-change
-
-### vi-change-eol (unbound) (C) (unbound)
-### Kill to the end of the line and enter insert mode.
-
-vi-change-eol() {
- show_mode "INSERT"
- builtin zle .vi-change-eol
-}
-zle -N vi-change-eol
-bindkey -M vicmd "C" vi-change-eol
-
-### vi-change-whole-line (unbound) (S) (unbound)
-### Kill the current line and enter insert mode.
-
-vi-change-whole-line() {
- show_mode "INSERT"
- builtin zle .vi-change-whole-line
-}
-zle -N vi-change-whole-line
-bindkey -M vicmd "S" vi-change-whole-line
-
-### vi-insert (unbound) (i) (unbound)
-### Enter insert mode.
-
-vi-insert() {
- show_mode "INSERT"
- builtin zle .vi-insert
-}
-zle -N vi-insert
-bindkey -M vicmd "i" vi-insert
-
-### vi-insert-bol (unbound) (I) (unbound)
-### Move to the first non-blank character on the line
-### and enter insert mode.
-
-vi-insert-bol() {
- show_mode "INSERT"
- builtin zle .vi-insert-bol
-}
-zle -N vi-insert-bol
-bindkey -M vicmd "I" vi-insert-bol
-
-### vi-open-line-above (unbound) (O) (unbound)
-### Open a line above the cursor and enter insert mode.
-
-vi-open-line-above() {
- show_mode "INSERT"
- builtin zle .vi-open-line-above
-}
-zle -N vi-open-line-above
-bindkey -M vicmd "O" vi-open-line-above
-
-### vi-open-line-below (unbound) (o) (unbound)
-### Open a line below the cursor and enter insert mode.
-
-vi-open-line-below() {
- show_mode "INSERT"
- builtin zle .vi-open-line-below
-}
-zle -N vi-open-line-below
-bindkey -M vicmd "o" vi-open-line-below
-
-### vi-substitute (unbound) (s) (unbound)
-### Substitute the next character(s).
-
-vi-substitute() {
- show_mode "INSERT"
- builtin zle .vi-substitute
-}
-zle -N vi-substitute
-bindkey -M vicmd "s" vi-substitute
-
-
-### vi-replace (unbound) (R) (unbound)
-### Enter overwrite mode.
-###
-
-vi-replace() {
- show_mode "REPLACE"
- builtin zle .vi-replace
-}
-zle -N vi-replace
-bindkey -M vicmd "R" vi-replace
-
-### vi-cmd-mode (^X^V) (unbound) (^[)
-### Enter command mode; that is, select the `vicmd'
-### keymap. Yes, this is bound by default in emacs
-### mode.
-
-vi-cmd-mode() {
- show_mode "NORMAL"
- builtin zle .vi-cmd-mode
-}
-zle -N vi-cmd-mode
-bindkey -M viins "\e" vi-cmd-mode
-
-
-
-### vi-oper-swap-case
-### Read a movement command from the keyboard, and swap
-### the case of all characters from the cursor position
-### to the endpoint of the movement. If the movement
-### command is vi-oper-swap-case, swap the case of all
-### characters on the current line.
-###
-
-bindkey -M vicmd "g~" vi-oper-swap-case
-
-
-
-### LOAD EXTENSIONS
-zmodload zsh/parameter
-# zmodload zftp
-
-### MISC
-
-umask 022
-mesg n
-ulimit -c unlimited
-
-# create iab's for my mutt-aliases to be sourced from within vim
-# cat ~/.muttrc.aliases | sed -e 's/^#/"/' -e 's/^alias/iab/' > ~/.vim_mutt.aliases
-
-# Colourize cursor on Linux console
-# echo -e "\033[?17;216;64c"
-# echo -e "\033[?17;215;55c"
-
-###### ### a clock in the prompt. Yes, this _is_ cool. But sometimes, it interferes with
-###### ### other things.
-###### ### I no longer need it as I have a running clock on my desktop when running
-###### ### X and a clock in screen's hardstatus line when running on the console
-###### trap CRON ALRM
-###### TMOUT=1
-###### CRON() {
-###### local STRING
-###### local COL
-###### local x
-###### STRING=$(date)
-###### COL=$[COLUMNS-5]
-###### COL=$[COL-$#STRING]
-###### x=$(echo $PREBUFFER | wc -l )
-###### x=$[x+1]
-###### echo -n "\e7\e[$x;A\e[$COL;G\e[0;37;44m-- $STRING --\e[0m\e8"
-###### }
-
-### thanks to Riviera for this one...
-### don't use it at the moment
-#*Riviera* chpwd () {
-#*Riviera* dirs >| $ZDOTDIR/zsave/zsh_dirstack_tty$tti
-#*Riviera* }
-#*Riviera* cdt () {
-#*Riviera* cd $(cut -d\ -f1 ~/.zsh/zsave/zsh_dirstack_tty$1|sed s/~/${HOME:gs./.\\\\/}/g)
-#*Riviera* }
-#*Riviera* und
-#*Riviera* in .zshrc
-#*Riviera* dirs $(sed s/~/${HOME:gs./.\\\\/}/g $ZDOTDIR/zsave/zsh_dirstack_tty$tti)
-#*Riviera* und in .zlogout nochmal das, was in chpwd steht.
-#*Riviera*
-#*Riviera* Damit kann ich 1. mit "cdt 3" in das in tty3 aktuelle Verzeichnis wechseln
-#*Riviera* und 2. nach nem login wieder denselben dirstack vorfinden auf derselben tty wie vorm ausloggen.
-#*Riviera* tti=$(tty)
-#*Riviera* tti=${tti#*/dev/tty}
-#*Riviera* Kommt noch dazu. Eigentlich hatte ich dann immer noch
-#*Riviera* case $tti in
-#*Riviera* [A-Za-z]*)tti=${tti%*[0-9]};;
-#*Riviera* *);;
-#*Riviera* esac
-#*Riviera* aber das hab ich rausgenommen
-#*Riviera* :)
-
-
-### COMPLETION AND MORE
-
-# The following lines were added by compinstall
-[[ -z $fpath[(r)$_compdir] ]] && fpath=($fpath $_compdir)
-#fpath=(/home/tkoehler/zsh/foo $fpath)
-
-autoload -U compinit
-compinit
-
-local _myhosts
-_myhosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*})
-# zstyle ':completion:*' hosts $_myhosts
-
-zstyle ':completion:*' auto-description 'specify %d'
-zstyle ':completion:*' completer _complete _ignored _match _correct _approximate _prefix
-zstyle ':completion:*' file-sort name
-zstyle ':completion:*' format 'Completing %d'
-zstyle ':completion:*' group-name ''
-## domains to use for mutt user@host<TAB> completion
-zstyle '*mutt*' hosts 'picard.franken.de' 'vim.org'
-zstyle '*' hosts 'picard.franken.de' 'unser.linux.laeuft.auf.s390.org'
-zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the character to insert%s'
-zstyle ':completion:*' matcher-list 'r:|[._-]=** r:|=**' 'l:|=* r:|=*' 'm:{a-z}={A-Z}'
-zstyle ':completion:*' match-original both
-zstyle ':completion:*' max-errors 3
-zstyle ':completion:*' menu select=0
-zstyle ':completion:*' prompt 'CORRECT (%e errors found) > '
-zstyle ':completion:*' special-dirs true
-zstyle ':completion:*' squeeze-slashes true
-zstyle '*mutt*' users vim vim-dev tkoehler
-zstyle '*' users thomas tkoehler
-zstyle ':completion:*' verbose true
-zstyle :compinstall filename '/home/tkoehler/.zshrc'
-# End of lines added by compinstall
-#fpath=(/usr/share/doc/zsh/examples/Functions/Misc/ $fpath)
-#autoload nslookup
-
-
-zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
-zstyle ':completion:*:*:*:*:hosts' list-colors '=(#b)(*)(to.com)=34;40=35;40' '=(#b)(*)(mayn.de)=36;40=35;40' '=unser.linux.laeuft.auf.s390.org=33;40' '=*=31;40'
-zstyle ':completion:*:*:*:*:users' list-colors '=*=32;40'
-
-autoload -U zfinit
-zfinit
+++ /dev/null
-#!/usr/bin/zsh
-# -*- mode: shell-script -*-
-
-# In Emacs, use M-x folding. Quick reference:
-#
-# Show all sections' text 'C-c @ C-o'
-# Hide all sections' text 'C-c @ C-w'
-# Show a section's text 'C-c @ C-s'
-# Hide a section's text 'C-c @ C-x'
-
-# {{{ zstyle completions
-
-## These next 2 lines are from compinstall.
-zstyle ':completion:*' completer _expand _complete _correct _approximate
-zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
-
-zstyle ':completion:*:options' description 'yes'
-zstyle ':completion:*:options' auto-description '%d'
-
-## All of the following zstyles are from:
-## (http://www.zshwiki.org/cgi-bin/wiki.pl?ZshCompletionTips)
-
-### Use cache
-## Some functions, like _apt and _dpkg, are very slow. You can use a cache in
-## order to proxy the list of results (like the list of available debian
-## packages)
-zstyle ':completion:*' use-cache on
-zstyle ':completion:*' cache-path ~/.zsh/cache
-
-## Prevent CVS files/directories from being completed
-zstyle ':completion:*:(all-|)files' ignored-patterns '(|*/)CVS'
-zstyle ':completion:*:cd:*' ignored-patterns '(*/)#CVS'
-
-# Allow zsh to complete on hostnames found in common config files.
-local _myhosts;
-_myhosts=( ${${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) /dev/null)"}%%[# ]*}//,/ }:#\!*}
- ${=${(f)"$(cat /etc/hosts(|)(N) <<(ypcat hosts 2>/dev/null))"}%%\#*}
- );
-zstyle ':completion:*' hosts $_myhosts;
-
-## With commands like `rm' it's annoying if one gets offered the same filename
-## again even if it is already on the command line. To avoid that:
-#
-zstyle ':completion:*:rm:*' ignore-line yes
-
-## Load the completion module.
-zstyle :compinstall filename '/home/zyrnix/.zshrc'
-autoload -U compinit
-compinit
-
-# }}}
-# {{{ PS1 prompt
-
-# Enable this for a nice interactive way to get a decent prompt.
-# autoload -U promptinit
-# promptinit
-# prompt adam1
-## At the command line, you can do this to see the various prompts:
-# prompt -l # display all
-# prompt -h # help
-
-# This is based on adam1 from promptinit. I altered it so it includes a
-# history number and return code. It does not truncate the path.
-#
-# It looks like this (with colors):
-# 384 zyrnix@server ~/tmp %
-#
-PS1=$'%h %{\e[22;44m%}%n@%m%{\e[00m%} %{\e[01;36m%}%0~%{\e[01;37m%} %# %{\e[00m%}'
-
-# }}}
-# {{{ xterm tweaks
-
-## FAQ 3.5 How do I get the meta key to work on my xterm?
-## http://zsh.sourceforge.net/FAQ/zshfaq03.html#l21
-[[ $TERM = "xterm" ]] && stty pass8 && bindkey -me
-
-## FAQ 3.6 How do I automatically display the directory in my xterm title bar?
-## http://zsh.sourceforge.net/FAQ/zshfaq03.html#l22
-##
-## I modified the xterm version because it was too plain.
-chpwd() {
- [[ -t 1 ]] || return
- case $TERM in
- sun-cmd) print -Pn "\e]l%~\e\\"
- ;;
- *xterm*|rxvt|(dt|k|E)term) print -Pn "\e]2;% [zsh $ZSH_VERSION] %n@%m: %~\a"
- ;;
- esac
-}
-
-# }}}
-# {{{ Zsh FAQ entries
-
-## FAQ 3.18: Why does zsh kill off all my background jobs when I logout?
-## http://zsh.sourceforge.net/FAQ/zshfaq03.html#l34
-# setopt nohup
-#
-## Or start jobs with &! instead of & to disown them
-## (disown = don't kill at logout)
-
-## FAQ 3.21: Why is my history not being saved?
-## http://zsh.sourceforge.net/FAQ/zshfaq03.html#l37
-##
-## I modified this to allow for 2,000 entries instead of 200.
-HISTSIZE=2000
-HISTFILE=~/.zsh_history
-SAVEHIST=2000
-
-## FAQ 3.23: How do I prevent the prompt overwriting output when there is no
-## newline?
-## http://zsh.sourceforge.net/FAQ/zshfaq03.html#l39
-##
-## According to the manual, this prevents multi-line editing because the editor
-## does not know where the start of the line appears.
-##
-# unsetopt prompt_cr
-
-# }}}
-# {{{ General setopts
-
-## Don't clobber files by default. Force myself to use >! or >| and >>! or >>|
-## to clobber the file
-unsetopt clobber
-
-## I use dvorak, so correct spelling mistakes that a dvorak user would make
-setopt dvorak
-
-## Extended history.
-## Instead of just a list of commands, append it with this:
-## `:<beginning time since epoch>:<elapsed seconds>:<command>'.
-setopt extended_history
-
-## Automatically append directories to the push/pop list
-setopt auto_pushd
-
-## Maximum size of the directory stack
-DIRSTACKSIZE=50
-
-## Allow for 10MB max coredumps
-limit coredumpsize 10m
-
-# }}}
-# {{{ Emacs compatibility
-
-## FAQ 3.10: Why does zsh not work in an Emacs shell mode any more?
-## http://zsh.sourceforge.net/FAQ/zshfaq03.html#l26
-[[ $EMACS = t ]] && unsetopt zle
-
-# Enable emacs keymap
-bindkey -e
-
-# From resolve (http://repose.cx/conf/.zshrc)
-WORDCHARS='' # Emacs compatible M-b and M-f
-bindkey "\C-w" kill-region # Emacs C-w command support
-
-# }}}
-# {{{ Watch logins
-
-## Watch for logins and logouts from all accounts including mine.
-watch=all
-
-## Watch every 30 seconds
-logcheck=30
-
-## Change the watch format to something more informative
-# %n = username, %M = hostname, %a = action, %l = tty, %T = time,
-# %W = date
-WATCHFMT="%n from %M has %a tty%l at %T %W"
-
-# }}}
-# {{{ Aliases
-
-## Aliases
-alias ls="ls --color=auto"
-alias targx="tar -zxvf"
-alias targc="tar -cxvf"
-alias tarbx="tar --bzip2 -xvf"
-alias tarbc="tar --bzip2 -cvf"
-
-# }}}
-# {{{ Setopts from Resolve
-
-## From resolve's config (http://repose.cx/conf/.zshrc)
-setopt extended_glob # Weird & wacky pattern matching - yay zsh!
-setopt complete_in_word # Not just at the end
-setopt always_to_end # When complete from middle, move cursor
-setopt correct # Spelling correction
-setopt hist_verify # When using ! cmds, confirm first
-setopt interactive_comments # Escape commands so I can use them later
-setopt print_exit_value # Alert me if something's failed
-
-## Anti-aliasing in the two toolkits
-## Use this type of assignment to set the variable if not already set
-(( ${+QT_XFT} )) || export QT_XFT=1
-(( ${+GDK_USE_XFT} )) || export GDK_USE_XFT=1
-
-# }}}
-# {{{ GNU Arch tagline - Do not edit this section
-
-# To insert a uuid with Linux kernel 2.3.16 or newer, do:
-# echo -e "\n# arch-tag: `cat /proc/sys/kernel/random/uuid`\n" >> file
-#
-# arch-tag: 223a17f5-7c19-4f32-8fa7-0c14054128be
-
-# }}}