-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
114 lines (92 loc) · 3.95 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
BASEDIR="$HOME/.dotfiles"
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export GPG_TTY=$(tty)
# Add sbin for Composer
export PATH=/usr/local/sbin:$PATH
# Make Brew ruby available
export PATH=/usr/local/opt/[email protected]/bin/:/usr/local/opt/ruby/bin:$PATH
# Make dotfile binaries available
export PATH="$BASEDIR/bin:$PATH"
# PHP Composer configuration
export COMPOSER_MEMORY_LIMIT=-1
export COMPOSER_HOME=~/.composer
export PATH=$COMPOSER_HOME/vendor/bin:$PATH
# Hide username from statusline
export DEFAULT_USER=`whoami`
# Activate Antigen - ZSH plugin manager
source $BASEDIR/bin/antigen.zsh
antigen use oh-my-zsh
antigen bundle docker
antigen bundle docker-compose
antigen bundle git
antigen bundle lukechilds/zsh-nvm
antigen bundle pj
if command -v tmux > /dev/null ; then
antigen bundle tmux
fi
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-syntax-highlighting
antigen theme agnoster
antigen apply
# Uncomment the following line to use case-sensitive completion.
CASE_SENSITIVE="true"
# Give Fish like suggestions a color
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=cyan"
# Uncomment the following line to enable command auto-correction.
ENABLE_CORRECTION="true"
# zsh-users/zsh-autosuggestions
bindkey '^ ' autosuggest-accept
export EDITOR='vim'
# SSH
export SSH_KEY_PATH=~/.ssh/id_rsa
if [ -f $SSH_KEY_PATH ]; then
ssh-add -K $SSH_KEY_PATH > /dev/null 2>&1
else
echo "Add private and public key to $SSH_KEY_PATH and $SSH_KEY_PATH.pub"
fi
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
alias artisan="php artisan"
alias dcr="docker-compose run --rm"
alias dcup="docker compose up"
alias dstats="docker stats"
alias gb="git branch --sort=committerdate"
alias gl="git pull --rebase"
alias gstpa="git stash --patch"
alias gstl="git stash list --format='%gd (%cr): %gs'"
alias php74="brew unlink [email protected] [email protected] [email protected] php && brew link [email protected]"
alias php80="brew unlink [email protected] [email protected] [email protected] php && brew link [email protected]"
alias php81="brew unlink [email protected] [email protected] [email protected] php && brew link [email protected]"
alias php82="brew unlink [email protected] [email protected] [email protected] php && brew link [email protected]"
alias php83="brew unlink [email protected] [email protected] [email protected] [email protected] && brew link php"
alias tf="terraform"
alias tfi="terraform import"
alias tfa="terraform fmt; terraform apply"
alias tfp="terraform fmt; terraform plan"
alias disable_xdebug74="mv `brew --prefix`/etc/php/7.4/conf.d/ext-xdebug.ini `brew --prefix`/etc/php/7.4/conf.d/ext-xdebug.ini.disabled"
alias disable_xdebug80="mv `brew --prefix`/etc/php/8.0/conf.d/ext-xdebug.ini `brew --prefix`/etc/php/8.0/conf.d/ext-xdebug.ini.disabled"
alias disable_xdebug81="mv `brew --prefix`/etc/php/8.1/conf.d/ext-xdebug.ini `brew --prefix`/etc/php/8.1/conf.d/ext-xdebug.ini.disabled"
alias enable_xdebug74="mv `brew --prefix`/etc/php/7.4/conf.d/ext-xdebug.ini.disabled `brew --prefix`/etc/php/7.4/conf.d/ext-xdebug.ini"
alias enable_xdebug80="mv `brew --prefix`/etc/php/8.0/conf.d/ext-xdebug.ini.disabled `brew --prefix`/etc/php/8.0/conf.d/ext-xdebug.ini"
alias enable_xdebug81="mv `brew --prefix`/etc/php/8.1/conf.d/ext-xdebug.ini.disabled `brew --prefix`/etc/php/8.1/conf.d/ext-xdebug.ini"
source $BASEDIR/fixup.zsh
unalias gcm 2>/dev/null
source $BASEDIR/gcm.zsh
source $BASEDIR/idea.zsh
# Configure pj (project jump) plugin
export PROJECT_PATHS=(~/Sites)
export VAGRANT_CWD=~/Homestead
alias homestead=vagrant
# When .zshrc.local exists load it to make device specific settings available
if [ -f ~/.zshrc.local ]; then
source ~/.zshrc.local
fi
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 PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"