forked from rheaditi/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
85 lines (68 loc) 路 2.5 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
export ZSH=/Users/${USER}/.oh-my-zsh
export UPDATE_ZSH_DAYS=2
# zsh stuff
COMPLETION_WAITING_DOTS="true"
DISABLE_UNTRACKED_FILES_DIRTY="true"
ZSH_THEME=""
plugins=(git zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh
# pure prompt
autoload -U promptinit; promptinit
prompt pure
# User configuration
export LANG=en_US.UTF-8
export SSH_KEY_PATH="~/.ssh/rsa_id"
# may not be required anymore
# export rvmsudo_secure_path=0 # rvm error: check `/etc/sudoers` for `secure_path`
# export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_161`
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
export PATH="/usr/local/opt/ruby/bin:/$HOME/.gem/ruby/2.6.0/bin:$PATH"
# Development 馃枼
DIR_DEV="$HOME/dev"
DIR_DOTFILES="$DIR_DEV/dotfiles"
# alias: generic
alias ohmyzsh="code ~/.oh-my-zsh"
alias dotfiles="cd $DIR_DOTFILES"
alias edit-dotfiles="code $DIR_DOTFILES"
alias moo='fortune | cowsay | lolcat'
alias filedate='date +%Y_%m_%d__%H_%M_%S'
alias uuid='uuidgen | tr "[:upper:]" "[:lower:]"'
# Git things 馃尣
alias delete-branches='git branch >/tmp/merged-branches && vi /tmp/merged-branches && xargs git branch -D </tmp/merged-branches'
alias clean-merged-branches='git branch --merged >/tmp/merged-branches && vi /tmp/merged-branches && xargs git branch -d </tmp/merged-branches'
alias clean-remote-branches='git branch -a >/tmp/remote-branches && vi /tmp/merged-branches && xargs git branch -d </tmp/merged-branches'
alias reflog='gitk --all --date-order $(git log -g --pretty=%H)'
alias find-dangling='git fsck | grep "dangling commit" | awk "{print $3;}"'
alias gbdd='git branch -D'
# alias: typos 馃懟
alias got='git'
alias tit='git'
alias hit='git'
alias hot='git'
# alias: npm
alias nr='npm run'
alias nt='npm run test'
alias ns='npm start'
alias nb='npm run build'
alias npmplease='rm -rf node_modules && rm package-lock.json && npm i'
alias npmnuke='rm -rf node_modules && npm i && lerna exec -- "rm -rf node_modules && npm i"'
# alias: other 馃
alias pra='pm2 restart all'
alias pka='pm2 kill all'
alias pda='pm2 delete all'
alias pmlog='pm2 logs --lines 200'
alias zreload='source ~/.zshrc'
alias zsource='source ~/.zshrc'
# source remaining files
source "$DIR_DOTFILES/zsh/shell-functions.sh"
source "$DIR_DOTFILES/private/work.sh"
# other exports
export EDITOR=vim
# python shit
export WORKON_HOME=~/Envs
source /usr/local/bin/virtualenvwrapper.sh
export PATH="/usr/local/sbin:$PATH"
# mooooo
moo