Skip to content

Instantly share code, notes, and snippets.

@handlename
Created November 26, 2009 00:29
Show Gist options
  • Save handlename/243122 to your computer and use it in GitHub Desktop.
Save handlename/243122 to your computer and use it in GitHub Desktop.
# Created by newuser for 4.3.10
#
# path
#____________________________________________________________
export PATH=$PATH:/opt/local/bin
export PATH=$PATH:/opt/local/sbin
export PATH=$PATH:/usr/local/bin
export PATH=$PATH:/usr/local/mysql/bin
export MANPATH=$MANPATH:/opt/local/man
# for Go
export GOROOT=$HOME/go
export GOOS=darwin
export GOARCH=amd64
export GOBIN=$HOME/bin
export PATH=$GOBIN:$PATH
#
# extended auto complete
#____________________________________________________________
autoload -U compinit
compinit
#
# dir history
#____________________________________________________________
setopt auto_pushd
#
# interactive correct
#____________________________________________________________
setopt correct
#
# set color for ls
#____________________________________________________________
export LSCOLORS=exfxcxdxbxegedabagacad
export LS_COLORS='di=34:ln=35:so=32:pi=33:ex=31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;30'
#
# show colorful candidates
#____________________________________________________________
zstyle ':completion:*' list-colors 'di=34' 'ln=35' 'so=32' 'ex=31' 'bd=46;34' 'cd=43;34'
#
# prompt
#____________________________________________________________
if [ "${TERM}" != "dumb" ]; then
autoload colors
colors
PROMPT="%B%{${fg[cyan]}%}%n @%m: %{${fg[red]}%}%1~ %(!,#,$)%{${reset_color}%}%b "
RPROMPT="%B%{${fg[cyan]}%}[%/]%{${reset_color}%}%b"
PROMPT2="%B%{${fg[orange]}%}%_ %%%{${reset_color}%}%b "
SPROMPT="%{${fg[yellow]}%}%r%{${reset_color}%} is correct? [n, y, a, e]: "
fi
#
# terminal title
#____________________________________________________________
case "${TERM}" in
kterm*|xterm|xterm-color)
precmd() {
echo -ne "\033]0;${USER}@${HOST%%.*}:${PWD}\007"
}
;;
esac
case "${TERM}" in
dumb | emacs)
PROMPT="%m:%~> "
unsetopt zle
;;
esac
#
# command history
#____________________________________________________________
HISTFILE=~/.zsh_history
HISTSIZE=500000
SAVEHIST=500000
setopt hist_ignore_dups
setopt share_history
autoload history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "^P" history-beginning-search-backward-end
bindkey "^N" history-beginning-search-forward-end
#
# alias
#____________________________________________________________
setopt complete_aliases
alias ls='ls -G'
alias la='ls -aG'
alias ll='ls -lhG'
alias lla='ls -lahG'
alias df='df -h'
alias du='du -h'
alias apache2ctl='sudo /opt/local/apache2/bin/apachectl'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment