homes/common/.zshrc

128 lines
3.9 KiB
Bash
Raw Normal View History

2013-05-02 12:38:30 +02:00
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
2013-05-09 15:21:46 +02:00
export TERM="screen-256color"
2013-05-02 18:11:33 +02:00
2013-05-02 12:38:30 +02:00
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
2013-05-02 18:11:33 +02:00
#ZSH_THEME="robbyrussell"
2013-05-02 12:38:30 +02:00
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Comment this out to disable weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
2013-05-02 18:11:33 +02:00
COMPLETION_WAITING_DOTS="true"
2013-05-02 12:38:30 +02:00
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
2013-05-02 18:11:33 +02:00
plugins=(git mercurial battery colorize debian django go pip python svn tmux vi-mode command-not-found)
2013-05-02 12:38:30 +02:00
source $ZSH/oh-my-zsh.sh
2013-05-02 18:11:33 +02:00
source ~/.zshrc-local
source ~/.zshrc-local-theme
2013-05-02 12:38:30 +02:00
autoload -Uz promptinit
promptinit
autoload -U zsh-mime-setup
autoload -U zsh-mime-handler
zsh-mime-setup
2013-05-02 23:36:55 +02:00
#autoload -Uz vcs_info
#zstyle ':vcs_info:*' enable git svn hg bzr mtn
#precmd() {
# vcs_info
#}
2013-05-02 18:11:33 +02:00
zstyle ':vcs_info:*' actionformats
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
2013-05-02 12:38:30 +02:00
alias make='colormake'
alias gcc='colorgcc'
alias diff='colordiff'
alias vim='vim -p'
alias ls='ls --color'
alias ll='ls -la'
alias l='ls -a'
alias grep='grep --color'
export COLORFGBG="default;default"
function cd() {
builtin cd $@;
if [ -f env/bin/activate ]
then
source env/bin/activate
elif [ -f bin/activate ]
then
source bin/activate
elif [ -f ../env/bin/activate ]
then
source ../env/bin/activate
fi
}
# Customize to your needs...
2013-05-02 23:36:55 +02:00
export PATH=$PATH:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/games:~/.local/bin
. ~/.local/lib/python2.7/site-packages/powerline/bindings/zsh/powerline.zsh
2013-05-02 12:38:30 +02:00
2013-05-02 18:11:33 +02:00
ssc() { ssh -XC -p ${3:-"22"} -t ${2:-`whoami`}@$1 "tmux ${argv[4,-1]:-"attach-session"} || tmux ${argv[4,-1]} ;" }
2013-05-02 12:38:30 +02:00
2013-05-02 18:11:33 +02:00
senritsu() { ssc senritsu.kujiu.org ${argv[-1]:-`whoami`} 22 $argv[1,-2]; }
gon() { ssc gon.kujiu.org ${argv[-1]:-`whoami`} 2208 $argv[1,-2]; }
kirua() { ssc kirua.kujiu.org ${argv[-1]:-`whoami`} 22 $argv[1,-2]; }
kurapika() { ssc kurapika.kujiu.org ${argv[-1]:-`whoami`} 2242 $argv[1,-2]; }
leorio() { ssc leorio.kujiu.org ${argv[-1]:-`whoami`} 22 $argv[1,-2]; }
ellcrys() { ssc ellcrys.kujiu.org ${argv[-1]:-`whoami`} 22 $argv[1,-2]; }
bisuke() { ssc bisuke.kujiu.org ${argv[-1]:-`whoami`} 22 $argv[1,-2]; }
goreinu() { ssc goreinu.kujiu.org ${argv[-1]:-`whoami`} 22 $argv[1,-2]; }
pakunoda() { ssc pakunoda.kujiu.org ${argv[-1]:-`whoami`} 22 $argv[1,-2]; }
hisoka() { ssc hisoka.kujiu.org ${argv[-1]:-`whoami`} 22 $argv[1,-2]; }
2013-05-02 12:38:30 +02:00
alias gitst="git status | more"
alias gitci="git commit"
2013-05-31 16:53:57 +02:00
alias gitcia='git commit -a'
alias gitco="git checkout"
alias gitdiff='git diff'
alias gitgrep='git grep'
alias gitlog='git log --name-status'
alias gittree='git log --graph'
alias gitlstags='git describe --tags'
alias gittag='git tag -a'
2013-10-09 11:09:45 +02:00
alias gitw='git instaweb --httpd=webrick'
alias gitpull='git pull --stat --progress'
gitgrephistory(){
if [ $# = 1 ] ; then
git rev-list --all | xargs git grep "$1"
else
git rev-list --all | sed 's!$!:'"$1"'!' | xargs git grep "$2"
fi
}
2013-05-02 18:11:33 +02:00
hl() { highlight --out-format=xterm256 -l ${argv} | less -R; }
2013-05-03 06:58:31 +02:00
bindkey "^[[A" history-search-backward
bindkey "^[[B" history-search-forward
POWERLINE_DETECT_SSH="true"
POWERLINE_FULL_CURRENT_PATH="true"