-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
83 lines (66 loc) · 2.07 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
export EDITOR=nvim
export VISUAL=nvim
export GIT_EDITOR=nvim
export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
export HISTSIZE=1000
export DIRENV_LOG_FORMAT=
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
# https://github.com/rails/rails/issues/38560
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
# PATH additions:
# NPM packages
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
# Homebrew CBC is keg-only
export PATH="/opt/homebrew/opt/cbc/bin:$PATH"
# pip installs its binaries here. Used for AWS CLI
export PATH="$PATH:/Users/yboulkaid/.local/bin"
# Postgres.app
export PATH="$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin"
source ~/.aliases
if [[ -f $HOME/.workatorc ]]; then
source $HOME/.workatorc
fi
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
# Source fzf for fuzzy finding
export FZF_TMUX_HEIGHT=10
export FZF_CTRL_R_OPTS=--sort
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# Fuzzy find project and open vim
pp() {
local dir
dir=$(find ~/Projects -type d -maxdepth 2 | sed 's/.*Projects\///g' | fzf ) &&
cd "$HOME/Projects/$dir"
}
bb() {
git branch | grep -v "^\*" | fzf --height=20% --reverse --info=inline | xargs git checkout
}
setopt auto_cd
eval "$(direnv hook zsh)"
# Allow [ or ] whereever you want
# Cf. https://github.com/thoughtbot/dotfiles/pull/194
unsetopt nomatch
if [[ -f $HOME/.asdf/asdf.sh ]]; then
source $HOME/.asdf/asdf.sh
fi
if [[ -f /opt/homebrew/opt/asdf/libexec/asdf.sh ]]; then
source /opt/homebrew/opt/asdf/libexec/asdf.sh
fi
if [ "$TMUX" = "" ];
then tmux attach -t base || tmux new -s base
fi
# ZSH completions
fpath=(/opt/homebrew/share/zsh/site-functions $fpath)
[[ $commands[kubectl] ]] && source <(kubectl completion zsh)
# Workato:
export PATH="/opt/homebrew/opt/postgresql@11/bin:$PATH"
# instantclient
export OCI_DIR="$HOME/instantclient_12_1"
export DYLD_LIBRARY_PATH="$HOME/instantclient_12_1"
export ENV_SH_EXEC_CONTEXT=apple_silicon