-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
139 lines (103 loc) · 3.25 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
135
136
137
138
139
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
export FZF_BASE=/usr/local/bin/fzf
case `uname` in
Darwin)
# Set homebrew path
eval "$(/opt/homebrew/bin/brew shellenv)"
export PATH="$(brew --prefix)/bin/:$PATH"
# Enable zsh-autosuggestions
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# Enable zsh-syntax-highlighting
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# fnm
FNM_PATH="/Users/alikhattab/Library/Application Support/fnm"
if [ -d "$FNM_PATH" ]; then
export PATH="/Users/alikhattab/Library/Application Support/fnm:$PATH"
eval "`fnm env`"
fi
;;
Linux)
# Enable zsh-autosuggestions
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
# Enable zsh-syntax-highlighting
source ~/.zsh/./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# fnm
FNM_PATH="/home/ali/.local/share/fnm"
if [ -d "$FNM_PATH" ]; then
export PATH="/home/ali/.local/share/fnm:$PATH"
eval "`fnm env`"
fi
;;
FreeBSD)
# commands for FreeBSD go here
;;
esac
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
aliases
colored-man-pages
command-not-found
git
docker
docker-compose
fzf
gradle
kubectl
mvn
safe-paste
sdk
tig
tmux
vscode
yarn
zsh-interactive-cd
zsh-fzf-history-search
)
# User configuration
source $ZSH/oh-my-zsh.sh
# bat color scheme
export BAT_THEME="ansi"
# alias awsume
alias awsume=". awsume"
# Changing "ls" to "exa"
alias ls='eza --icons --color=always --group-directories-first'
alias ll='eza -alF --icons --color=always --group-directories-first'
alias la='eza -a --icons --color=always --group-directories-first'
alias l='eza -a --icons --color=always --group-directories-first'
alias l.='eza -a | egrep "^\."'
# Use keyword "idea" to open intelliJ
alias idea='open -na "IntelliJ IDEA CE.app"'
# git alias to go to root of repo
alias gitroot='cd $(git rev-parse --show-toplevel)'
# unset the gm (git merge) alias for graphicsmaick
unalias gm
# Function to decode kubernetes secret
#
# E.g. kubectl get secret my-secret -o json | ksec
ksec() { jq '.data | map_values(@base64d)' }
# Starship prompt
eval "$(starship init zsh)"
# Add Go to path variable
export PATH=$PATH:$HOME/go/bin
# Enable kubectl krew plugin manager
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
# Adding psql to path
export PATH="/usr/local/opt/libpq/bin:$PATH"
# Set FluxCD autocompletions
command -v flux >/dev/null && . <(flux completion zsh)
export GPG_TTY=$(tty)
eval "$(direnv hook zsh)"
eval "$(fnm env --use-on-cd --shell zsh)"
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init - zsh)"
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"