-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.zshrc
More file actions
172 lines (138 loc) · 4.04 KB
/
.zshrc
File metadata and controls
172 lines (138 loc) · 4.04 KB
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# General setting
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export EDITOR='nvim'
###
# zsh configuration
###
setopt COMPLETE_ALIASES
setopt GLOB_COMPLETE
# The following lines were added by compinstall
zstyle :compinstall filename '/Users/peter/.zshrc'
fpath=(/Users/peter/.docker/completions $fpath)
autoload -Uz compinit
compinit
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# End of lines added by compinstall
# zsh History
HISTFILE=$HOME/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt appendhistory
###
# Main paths definition
###
export DEVPATH=$HOME/Developer
export PATH=$DEVPATH/bin:$HOME/.local/bin:/usr/local/sbin:$PATH
###
# Aliases and env variables
####
# Load local variables
source ~/.env
# Aliases
source ~/.zsh_aliases
# Special stuff for the visual man page improvement
function gman {
if [ $# -eq 1 ]; then
open x-man-page://$1
elif [ $# -eq 2 ]; then
open x-man-page://$1/$2
fi
}
###
# Tooling configuration
####
# Homebrew setup
export HOMEBREW_NO_ANALYTICS=1
brew-app-upgrade() {
brew upgrade $(brew list --cask -1)
}
# .NET Setup
export DOTNET_CLI_TELEMETRY_OPTOUT=1
# 1Password Setup
export OP_BIOMETRIC_UNLOCK_ENABLED=true
source /Users/peter/.config/op/plugins.sh
# Rust setup
if [ -f $HOME/.cargo/env ]; then
source $HOME/.cargo/env
fi
export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src"
# Foundry
if [ -d $HOME/.foundry ]; then
export PATH="$PATH:/Users/peter/.foundry/bin"
fi
# GitHub CLI settings
if [ -f ~/.gh.inc ]; then
source ~/.gh.inc
fi
# Bun settings
if [ -d $HOME/.bun ]; then
export PATH=$PATH:$HOME/.bun/bin
source $HOME/.bun/_bun
fi
# Google configuration
# export GOOGLE_APPLICATION_CREDENTIALS=$HOME/.config/gcloud/application_default_credentials.json
# The next line updates PATH for the Google Cloud SDK.
# if [ -f $DEVPATH/bin/google-cloud-sdk/path.zsh.inc ]; then
# source $DEVPATH/bin/google-cloud-sdk/path.zsh.inc
# fi
# # The next line enables shell command completion for gcloud.
# if [ -f $DEVPATH/bin/google-cloud-sdk/completion.zsh.inc ]; then
# source $DEVPATH/bin/google-cloud-sdk/completion.zsh.inc
# fi
export NVM_DIR="$HOME/.nvm"
if [ -s "$NVM_DIR/nvm.sh" ]; then
source "$NVM_DIR/nvm.sh"
fi
# Go configuration
export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin
export PATH=$GOBIN:$PATH
# Python configuration
export PYTHONPATH="~/.venv/"
# export VIRTUAL_ENV_DISABLE_PROMPT=1
# OpenSSL setup
export PATH=/usr/local/opt/openssl/bin:$PATH
export LDFLAGS="-L/usr/local/opt/openssl/lib -L/usr/local/lib -L/usr/local/opt/expat/lib"
export CFLAGS="-I/usr/local/opt/openssl/include -I/usr/local/include -I/usr/local/opt/expat/include"
export CPPFLAGS="-I/usr/local/opt/openssl/include -I/usr/local/include -I/usr/local/opt/expat/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
# LLVM setup
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
# Java setup
export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"
# Android tools setup
if [ -d "$HOME/Developer/bin/android/platform-tools" ]; then
export PATH="$HOME/Developer/bin/android/platform-tools:$PATH"
fi
# Added for LM Studio CLI support
if [ -d "$HOME/.cache/lm-studio" ]; then
export PATH="$PATH:/Users/peter/.cache/lm-studio/bin"
fi
# End of LM Studio CLI section
# Docker setup
docker-prune () {
docker stop $(docker ps -aq)
docker rm $(docker ps -q --filter status=exited)
docker volume rm $(docker volume ls -q)
docker network rm $(docker network ls -q)
docker rmi $(docker images -q --filter dangling=true)
}
docker-cleanup () {
docker rm $(docker ps -aq -f "status=exited")
docker rmi $(docker images -q --filter dangling=true)
}
#
# Canton setup
if [ -d "$HOME/.daml" ]; then
export PATH="$PATH:$HOME/.dpm/bin:$HOME/.daml/bin"
fi
# Added by Antigravity
export PATH="/Users/peter/.antigravity/antigravity/bin:$PATH"
# Set up fzf key bindings and fuzzy completion
source <(fzf --zsh)
# Setup starship
export STARSHIP_CACHE=~/.starship/cache
eval "$(starship init zsh)"