121 lines
3.3 KiB
Bash
121 lines
3.3 KiB
Bash
#complist
|
|
# If not running interactively, don't do anything
|
|
[ -z "$PS1" ] && return
|
|
|
|
# don't put duplicate lines in the history. See bash(1) for more options
|
|
export HISTCONTROL=ignoredups
|
|
_JAVA_AWT_WM_NONREPARENTING=1; export _JAVA_AWT_WM_NONREPARENTING
|
|
|
|
# make less more friendly for non-text input files, see lesspipe(1)
|
|
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
|
|
|
|
# set variable identifying the chroot you work in (used in the prompt below)
|
|
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
|
|
debian_chroot=$(cat /etc/debian_chroot)
|
|
fi
|
|
|
|
|
|
PERL5LIB=$HOME/local/lib64/perl5/site_perl/5.8.8/
|
|
autoload -U compinit
|
|
compinit
|
|
setopt extended_glob
|
|
bindkey -e
|
|
#ZLS_COLORS=$LS_COLORS
|
|
|
|
|
|
export DISTCC_HOSTS='hyades01 hyades02 hyades03 hyades04'
|
|
#if [[ "$GOROOT" == "" ]]; then
|
|
#export GOROOT=$HOME/local/go
|
|
#export GOARCH=amd64
|
|
#export GOOS=linux
|
|
#case `uname` in
|
|
#Darwin)
|
|
#export GOOS=darwin
|
|
#;;
|
|
#FreeBSD)
|
|
#export GOOS=freebsd
|
|
#;;
|
|
#esac
|
|
#fi
|
|
|
|
|
|
setopt prompt_subst
|
|
|
|
|
|
###
|
|
# See if we can use colors.
|
|
|
|
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_LIGHT_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
|
|
eval PR_$color='%{$fg[${(L)color}]%}'
|
|
(( count = $count + 1 ))
|
|
done
|
|
PR_NO_COLOUR="%{$terminfo[sgr0]%}"
|
|
|
|
###
|
|
# Decide whether to set a screen title
|
|
# if [[ "$TERM" == "screen" ]]; then
|
|
# PR_STITLE=$'%{\ekzsh\e\\%}'
|
|
# else
|
|
# PR_STITLE=''
|
|
# fi
|
|
|
|
# preexec () {
|
|
# local CMD="${1/#sudo /#}"
|
|
# local CMD="${CMD/#nano /}"
|
|
# local CMD="${CMD/#ssh />}"
|
|
# $SCREENME true || echo -ne "\ek${CMD%% *}\e\\"
|
|
# }
|
|
#precmd () {
|
|
#$SCREENME true || echo -ne "\ekzsh\e\\"
|
|
#}
|
|
|
|
PROMPT='$PR_STITLE$PR_LIGHT_BLUE($PR_LIGHT_YELLOW%D{%H:%M}|%!$PR_BLUE%)[%(!.$PR_RED.$PR_GREEN)%n@%m$PR_LIGHT_CYAN %~$PR_BLUE]$PR_NO_COLOUR
|
|
%(!.#.$) '
|
|
#source .zshprompt
|
|
|
|
#source ~/.zsh_profile
|
|
source ~/.zprofile
|
|
if [ -f ~/.bash_aliases ]; then
|
|
source ~/.bash_aliases
|
|
fi
|
|
|
|
if [ -f /usr/local/bin/virtualenvwrapper_lazy.sh ]; then
|
|
source /usr/local/bin/virtualenvwrapper_lazy.sh
|
|
fi
|
|
|
|
fasd_cache="$HOME/.fasd-init-zsh"
|
|
if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then
|
|
fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcompinstall >| "$fasd_cache"
|
|
fi
|
|
source "$fasd_cache"
|
|
unset fasd_cache
|
|
|
|
|
|
source ~/.zshenv
|
|
|
|
##############################################################
|
|
## Stuff from http://zshwiki.org/home/examples/compquickstart #
|
|
###############################################################
|
|
zmodload zsh/complist
|
|
autoload -U compinit && compinit
|
|
zstyle ':completion:::::' completer _complete _approximate
|
|
zstyle -e ':completion:*:approximate:*' max-errors 'reply=( $(( ($#PREFIX + $#SUFFIX) / 3 )) )'
|
|
zstyle ':completion:*:descriptions' format "- %d -"
|
|
zstyle ':completion:*:corrections' format "- %d - (errors %e})"
|
|
zstyle ':completion:*:default' list-prompt '%S%M matches%s'
|
|
zstyle ':completion:*' group-name ''
|
|
zstyle ':completion:*:manuals' separate-sections true
|
|
zstyle ':completion:*' menu select
|
|
zstyle ':completion:*' verbose yes
|
|
## case-insensitive (uppercase from lowercase) completion
|
|
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
|
|
#zstyle ':completion:*' special-dirs ..
|
|
|
|
if [ -n "`which fortune`" ]; then
|
|
fortune
|
|
fi
|