#!/bin/zsh # I got this file from someone (don't remember who though) # and modified it :). # # Arne Schwabe # # 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)$(