forked from rocksolidwebdesign/home-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
103 lines (89 loc) · 3.14 KB
/
.zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# General ZSH options {{{
autoload -U colors && colors
autoload -Uz promptinit && promptinit
# prompt fire
h() { if [ -z "$*" ]; then history 1; else history 1 | egrep "$@"; fi; }
setopt histignorealldups sharehistory
# Use vim keybindings even if our EDITOR is set to emacs
bindkey -e
# Keep 1000 lines of history within the shell and save it to ~/.zsh_history:
HISTSIZE=1000
SAVEHIST=1000
HISTFILE=~/.zsh_history
# Use modern completion system
autoload -Uz compinit
compinit
zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' completer _expand _complete _correct _approximate
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' menu select=2
#eval "$(dircolors -b)"
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
zstyle ':completion:*' menu select=long
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' use-compctl false
zstyle ':completion:*' verbose true
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
# }}}
# Prompt {{{
parse_git_branch() {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
# ░▒▓██▓▒░
setPrompt() {
PS1="
%b%F{green}%K{black}%{░▒▓%}%b%F{green}%K{blue}%{█▓▒░%}%B%F{white}%K{blue}%n@%m%b%F{green}%K{blue}%{░▒▓██%}%b%F{green}%K{black}%{▓▒░%}%B%F{white}%K{black} %D{%H:%M:%S}%b%f%k %B%{$fg[magenta]%}$(parse_git_branch)%b%f%k
%}%b%f%k%# "
#PS1="%{$fg[green]%}%n%{$fg[blue]%}@%{$fg[green]%}%m%{$fg[magenta]%}$(parse_git_branch)%{$reset_color%}%# "
RPS1="%B%F{blue}%K{black}%~%{$reset_color%}"
}
precmd() {
setPrompt
}
# }}}
# Aliases {{{
alias ls="ls -GF"
alias ll="ls"
alias l="ls -lh"
alias la="ls -A"
alias lv="ls -lhA"
# git
alias git='noglob git'
alias gcm='git commit -m'
alias gca='git commit -a'
alias gcam='git commit -a -m'
alias gd='git diff'
alias gf='git fetch'
alias gu='git pull'
alias gr='git pull --rebase'
alias gp='git push origin HEAD'
alias gpu='git push -u origin HEAD'
alias gpf='git push --force origin HEAD'
alias gs='git status'
alias ga='git add'
alias gal='git add -A'
alias gco='git checkout'
alias gb='git branch'
alias gst='git stash'
alias gsa='git stash apply'
# }}}
# Environment Vars {{{
export RUBY_HEAP_MIN_SLOTS=1000000
export RUBY_HEAP_SLOTS_INCREMENT=1000000
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
export RUBY_GC_MALLOC_LIMIT=1000000000
export RUBY_HEAP_FREE_MIN=500000
#export TERM=xterm-256color
export EDITOR=$HOME/.bin/vim
export VISUAL=$HOME/.bin/vim
export ANDROID_HOME=$HOME/src/vendor/android-sdk-macosx
export PATH=$HOME/.bin:/usr/local/Cellar/postgresql/9.1.4/bin:$PATH:/media/user/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
# }}}
# Untracked Mods
source ~/.zshrc_local
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting