/
zshrc
92 lines (68 loc) · 2 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
# Homebrew
export PATH="/usr/local/bin"
# System binaries
export PATH=$PATH:"/usr/bin"
export PATH=$PATH:"/bin"
export PATH=$PATH:"/usr/sbin"
export PATH=$PATH:"/sbin"
# LaTex
export PATH=$PATH:"/Library/TeX/texbin"
# GoLang PATH
export GOPATH=$HOME/dev/go
export GOROOT="/opt/homebrew/opt/go/libexec"
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOBIN:$GOROOT/bin
# Rust
export PATH="$PATH:$HOME/.cargo/bin"
export RUST_SRC_PATH="$HOME/dev/rust/src"
# Python
export PATH="$PATH:$HOME/Library/Python/3.7/bin"
# Yarn
export PATH="$PATH:$HOME/.yarn/bin"
# Java
#export JAVA_HOME=$(/usr/libexec/java_home -v 11)
export GROOVY_HOME=/usr/local/opt/groovy/libexec
# Custom scripts
export PATH=$PATH:~/dotfiles/scripts
# Set language
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# Rust zsh completions
fpath+=~/.zfunc
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Using robby's awesome theme
ZSH_THEME="robbyrussell"
# Always start tmux in 256 color mode
alias tmux="TERM=screen-256color-bce tmux"
# stash, pull, stash pop
alias stashpull="git stash && git pull --rebase && git stash pop"
# Homebrew update
eval "$(/opt/homebrew/bin/brew shellenv)"
# Multi-user environment: https://www.codejam.info/2021/11/homebrew-multi-user.html
alias brew='sudo -Hu hendrik.purmann brew'
alias brewup="brew update && brew upgrade && brew cleanup && brew doctor"
# Use python 3
alias python=python3
alias k=kubectl
export HOMEBREW_NO_ANALYTICS=1
export HOMEBREW_NO_INSECURE_REDIRECT=1
export HOMEBREW_CASK_OPTS=--require-sha
# Name windows in tmux
DISABLE_AUTO_TITLE=true
plugins=(git kubectl helm)
# Fix zsh completion security warning
ZSH_DISABLE_COMPFIX=true
source $ZSH/oh-my-zsh.sh
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
listening() {
if [ $# -eq 0 ]; then
lsof -iTCP -sTCP:LISTEN -n -P
elif [ $# -eq 1 ]; then
lsof -iTCP -sTCP:LISTEN -n -P | grep -i --color $1
else
echo "Usage: listening [pattern]"
fi
}
export VOLTA_HOME="$HOME/.volta"
export PATH="$VOLTA_HOME/bin:$PATH"