Created
July 26, 2010 20:40
-
-
Save lentil/491198 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# paths | |
export PATH="/usr/local/bin:/usr/local/pgsql/bin:/usr/local/git/bin/:/usr/local/redis:$PATH" | |
export MANPATH=/usr/local/man:/usr/local/pgsql/man:/usr/local/git/share/man:$MANPATH | |
# history | |
HISTFILE=$HOME/.zhistory | |
HISTSIZE=100000 | |
SAVEHIST=100000 | |
setopt INC_APPEND_HISTORY | |
setopt HIST_IGNORE_DUPS | |
setopt HIST_IGNORE_SPACE | |
setopt EXTENDED_HISTORY | |
setopt AUTOPUSHD | |
# up/down arrow history matching | |
bindkey "^[[A" history-search-backward | |
bindkey "^[[B" history-search-forward | |
# programs | |
PAGER='less' | |
EDITOR='vim' | |
# enable colored LS | |
export CLICOLOR=true | |
export LSCOLORS=Bxfxcxdxbxegedabagacad | |
# completion options | |
autoload -Uz compinit | |
compinit | |
zstyle ':completion:*:descriptions' format "[%d]" | |
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 | |
zstyle ':completion:*' list-colors '' | |
# hacky git prompt | |
function __git_flags { | |
st=`git status -s` | |
local flags='' | |
`echo "$st" | grep -q '^[MAD]'` && flags="${flags}➚" | |
`echo "$st" | grep -q '^.[MAD]'` && flags="${flags}⚡" | |
`echo "$st" | grep -q '^?'` && flags="${flags}⊕" | |
echo $flags | |
} | |
function git_status { | |
local branch=`git symbolic-ref HEAD 2>/dev/null` | |
branch="${branch#refs/heads/}" | |
if [ $branch ]; then | |
echo " (${branch}$(__git_flags))" | |
fi | |
} | |
setopt prompt_subst | |
PROMPT='%c$(git_status) $ ' | |
# override settings for specific hosts | |
HOST_SPECIFIC_FILENAME=$HOME/.conf/zsh/`hostname -s`.zshrc | |
test -e $HOST_SPECIFIC_FILENAME && source $HOST_SPECIFIC_FILENAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment