~ frogb /.zshrc

export PATH="$PATH:/usr/local/bin"
export MANPAGER="/usr/bin/less"
export EDITOR="/usr/bin/vi"
#export XTERM="/usr/bin/terminal"
export XTERM="/usr/bin/Terminal"
export http_proxy='http://10.0.0.100:8118'
export SHELL="/bin/zsh"
export LC_CTYPE="en_GB"
export LC_TIME="en_GB"
export LESS="-i"
export CLASSPATH="/usr/share/jdbc-mysql/lib/jdbc-mysql.jar:$CLASSPATH"
#autoload -U promptinit
#promptinit
#prompt gentoo

autoload colors zsh/terminfo
if [[ "$terminfo[colors]" -ge 8 ]]; then
        colors
fi
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
    eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
    eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'     
(( count = $count + 1 ))
done
PR_NO_COLOUR="%{$terminfo[sgr0]%}"

PROMPT='$PR_GREEN%n@%m$PR_BLUE %40<..<%~ %# $PR_NO_COLOUR'
RPROMPT='$PR_NO_COLOUR %w (%T)$PR_NO_COLOUR'

autoload -U zsh-mime-setup
zsh-mime-setup

HISTFILE=~/.zshhistory
HISTSIZE=50000
SAVEHIST=50000

alias -g L1="*(.om[1])"
alias -g :g='| grep'

alias ll="ls *(.om[1,5])"
alias l1="ls *(.om[1])"
alias rby="irb --prompt my-prompt"
alias emacs="emacs -nw"
alias AC="ACCEPT_KEYWORDS=\"~x86\""
alias ls="ls --color=auto"
alias l="ls --color=auto"
alias c="cd"
alias cl="clear"
alias d="dirs -v"
alias info="pinfo"
alias sc="screen"
alias ese="esearch"
alias esync="emerge --sync"
alias back="Esetroot -scale"
alias fvwmrestart="FvwmCommand \"restart\""
alias vmore="vim -R -u ~/.vimrc -u ~/.vimrc.more"
alias gimp="gimp-remote"
alias mysql="mysql -u root -p"
alias oo="ooffice2"
alias config="./configure --prefix=/usr && make"
alias oxyd="enigma"
alias grep="grep --color=auto"
alias man="TERM=mostlike; man"

# Completition
compctl -b bindkey
compctl -v export
compctl -o setopt
compctl -v unset
compctl -o unsetopt
compctl -v vared
compctl -c which
compctl -c sudo

local _myhosts
_myhosts=( ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*} )
zstyle ':completion:*' hosts $_myhosts

compctl -g '/usr/share/games/emulation/mame/*(:t:r)' mame
compctl -g '/usr/share/games/emulation/genesis/*(:t)' gens
compctl -g '/usr/share/games/emulation/snes/*.smc(:t)' snes

eval `dircolors -b`
export ZLS_COLORS=$LS_COLORS

case $TERM in
    xterm* | rxvt*)
        precmd() { 
            print -Pn "\e]0;%n@%m: %~\a"
        }
        preexec() {
            print -Pn "\e]0;$1\a"
        }
        ;;
        screen)
        precmd() { 
                        print -nR $'\033k'"zsh"$'\033'\\\

                        print -nR $'\033]0;'"zsh"$'\a'
        }
        preexec() {
                        print -nR $'\033k'"$1"$'\033'\\\

                        print -nR $'\033]0;'"$1"$'\a'
        }
                ;;
esac

start-background() {
        BUFFER=$BUFFER"&"
        zle accept-line
}
start-nglob() {
        BUFFER="noglob "$BUFFER
        zle accept-line
}
complete-accept() {
        zle complete-word
        zle accept-line
}
start-nautilus() {
#        BUFFER="nautilus . &"
        BUFFER="thunar . &"
        zle accept-line
}
paste-xclip() {
        BUFFER=$BUFFER"`xclip -o`"
        zle end-of-line
}
infer-hist() {
        zle up-history
        zle infer-next-history
        zle accept-line
}
search-backwords() {
        zle history-incremental-search-backward $BUFFER
}
zle -N start-background
zle -N start-nglob
zle -N complete-accept
zle -N start-nautilus
zle -N paste-xclip
zle -N infer-hist
zle -N search-backwords 

bindkey -v
bindkey "^R" search-backwords
bindkey "^V" start-background
bindkey "^L" insert-last-word
bindkey "^E" emacs-forward-word
bindkey "^[[5C" emacs-forward-word
bindkey "^[[5D" emacs-backward-word
bindkey "^[[OC" emacs-forward-word
bindkey "^[[OD" emacs-backward-word

#bindkey "^[[C" emacs-forward-word
#bindkey "^[[D" emacs-backward-word

bindkey "^[OC" emacs-forward-word
bindkey "^[OD" emacs-backward-word
#bindkey "^[[1;5D" emacs-backward-word
#bindkey "^[[1;5C" emacs-forward-word
bindkey "^B" emacs-backward-word
bindkey "^W" delete-word
bindkey "^^" backward-kill-line
bindkey "^\\" kill-line
bindkey "^F" start-nautilus
bindkey "^X" paste-xclip
bindkey "^P" push-line
bindkey "^G" start-nglob
bindkey "^N" infer-hist
bindkey "^H" _history-complete-older
bindkey "^Z" undo 
bindkey "^[[Z" reverse-menu-complete

bindkey '^[[4~' end-of-line
bindkey '^[[1~' beginning-of-line
bindkey '^[[F' end-of-line
bindkey '^[[H' beginning-of-line
bindkey '^[OF' end-of-line
bindkey '^[OH' beginning-of-line
bindkey '^[[8~' end-of-line
bindkey '^[[7~' beginning-of-line

bindkey '^[[3~' delete-char

autoload -U compinit
compinit

autoload -U zmv
alias mmv="noglob zmv -W"

#zstyle ':completion:*' completer _expand _complete _ignored
zstyle ':completion:*' completer _complete _correct _approximate
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'

zstyle ':completion:*' expand 'yes'

zstyle ':completion:*:matches' group 'yes'
zstyle ':completion:*' verbose yes
zstyle ':completion:*:descriptions' format "$fg[green]%B---- %d%b"
zstyle ':completion:*:messages' format "$fg[green]%B---- %d%u%b"
zstyle ':completion:*:warnings' format "$fg[green]%B---- no match"
zstyle ':completion:*' group-name ''

#zstyle ':completion::complete:*:tar:directories' file-patterns '*~.*(-/)'
#zstyle ':completion:*:complete:-command-::commands' ignored-patterns '*\~'

zstyle ':completion:history-words:*:history-words' stop yes
#zstyle ':completion:history-words:*:history-words' list no
zstyle ':completion:history-words:*' remove-all-dups yes
#zstyle ':completion:history-words:*' menu yes
#zstyle ':completion:*:history-words' list false

zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
#zstyle ':completion:*:*' list-colors 'f=01;31'

# zsh 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_bg_nice              \
        brace_ccl            \
        correct_all          \
     NO_bsd_echo             \
     NO_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        \
     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        \
     NO_hist_verify          \
     NO_hup                  \
     NO_ignore_braces        \
     NO_ignore_eof           \
        interactive_comments \
            inc_append_history   \
     NO_list_ambiguous       \
     NO_list_beep            \
        list_types           \
        long_list_jobs       \
        magic_equal_subst    \
     NO_mail_warning         \
     NO_mark_dirs            \
     NO_menu_complete        \
        multios              \
     NO_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 [[ "$USER" != root ]]; then
        start-root() {
                BUFFER="su -c \""$BUFFER"\""
                zle accept-line
        }
        zle -N start-root start-root
        bindkey "^U" start-root
else
        bindkey -r "^U"
fi

if [[ "$USER" == david ]]; then
        export PATH="/home/david/.fvwm/bin:/home/david/bin:$PATH:/sbin:/usr/sbin"
        export NNTPSERVER="news.newnet.co.uk"
        export BROWSER="firefox"
        export ALEPHONE_DATA="."
        export OOO_FORCE_DESKTOP="gnome"
        alias nautilus="nautilus --no-desktop"

        JDK_HOME=/opt/sun-jdk-1.5.0.09
        JAVAC=${JDK_HOME}:/bin/javac
        PATH=${JDK_HOME}/bin:${JDK_HOME}/jre/bin:${PATH}
        MANPATH=${MANPATH}:${JDK_HOME}/man
        JAVA_HOME=${JDK_HOME}
fi

if [[ "$USER" == root ]]; then
        export PATH="$PATH:/home/david/bin"
fi  
Your Ad Here