-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
134 lines (109 loc) · 3.37 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Lines configure by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
bindkey -v
bindkey '^R' history-incremental-search-backward
export LANG=en_US.UTF-8
export KEYTIMEOUT=1
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/Users/ygd/.zshrc'
if which exenv > /dev/null; then eval "$(exenv init -)"; fi
autoload -Uz compinit
compinit
# End of lines added by compinstall
# colors
autoload -U colors
export LSCOLORS="Gxfxcxdxbxegedabagacad"
export CLICOLOR=1
# prompt
setopt prompt_subst
setopt prompt_percent
autoload -U promptinit
promptinit
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/local/etc/bash_completion.d/git-prompt.sh
precmd () { __git_ps1 "%{$fg_bold[cyan]%}%~%{$reset_color%} " "%# " "(%s) " }
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWSTASHSTATE=1
GIT_PS1_SHOWUNTRACKEDFILES=1
GIT_PS1_SHOWUPSTREAM="auto"
GIT_PS1_SHOWCOLORHINTS=1
export PATH=/usr/local/bin:$PATH
set undodir=~/.vim/undo
set undofile
alias ez="vim ~/repos/dotfiles/zshrc"
alias sz="source ~/.zshrc"
alias shf='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hhf='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
alias rake='noglob rake'
alias v="vim"
alias g='git status -u'
alias gb='git branch -a'
alias gbd='git branch -D'
alias gbdm='git branch --merged | grep -v “\*” | grep -v “master” | xargs -n 1 git branch -d'
alias gpl='git pull'
alias gp='git push'
alias ga='git add'
alias gap='git add --patch'
alias gaa='git add -A'
alias gs='git stash'
alias gsa='git stash apply'
alias gsc='git stash clear'
alias gd='git diff'
alias gl="git log --oneline --graph --decorate --date=relative"
alias gc='git commit --verbose'
alias gca='git commit -a'
alias gcamend='git commit --amend'
alias gco='git checkout'
alias gcom='git checkout master'
alias gcob='git checkout -b'
alias gmm='git merge master'
alias grom='git rebase origin/master'
alias gpf='git push --force-with-lease'
alias grpo='git remote prune origin'
alias b='bundle'
alias bu='bundle update'
alias be='bundle exec'
alias ber='bundle exec rake'
alias js='bundle exec jekyll serve --host=0.0.0.0'
alias d='docker'
alias drmia='docker rmi $(docker images -q)'
alias dps='docker ps'
alias dpsa='docker ps -a'
alias dc='docker-compose'
alias dcp='docker-compose pull'
alias dcb='docker-compose build'
alias dcbnc='docker-compose build --no-cache'
alias dcud='docker-compose up -d'
alias dcd='docker-compose down'
alias dcs='docker-compose stop'
alias dcl='docker-compose logs -f'
alias deit='docker exec -it'
alias c='clear'
alias ll='ls -lapG'
alias ..='cd ..'
alias ...='cd ../../'
alias ....='cd ../../../'
alias .....='cd ../../../../'
alias localhorst='sudo ifconfig lo0 alias 192.168.100.1'
function f() { cd $(find ~/repos -maxdepth 2 -type d | selecta) }
eval export PATH="/Users/ygd/.rbenv/shims:${PATH}"
[[ -s "$PATH/.gvm/scripts/gvm" ]] && source "$PATH/.gvm/scripts/gvm"
rbenv rehash 2>/dev/null
rbenv() {
typeset command
command="$1"
if [ "$#" -gt 0 ]; then
shift
fi
case "$command" in
rehash|shell)
eval `rbenv "sh-$command" "$@"`;;
*)
command rbenv "$command" "$@";;
esac
}
[[ -s "/Users/ygd/.gvm/scripts/gvm" ]] && source "/Users/ygd/.gvm/scripts/gvm"
. /usr/local/opt/asdf/asdf.sh