forked from lewagon/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
88 lines (68 loc) · 5.03 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
ZSH=$HOME/.oh-my-zsh
# You can change the theme with another one from https://github.com/robbyrussell/oh-my-zsh/wiki/themes
ZSH_THEME="robbyrussell"
# Useful oh-my-zsh plugins for Le Wagon bootcamps
plugins=(git gitfast last-working-dir common-aliases zsh-syntax-highlighting history-substring-search pyenv ssh-agent)
# (macOS-only) Prevent Homebrew from reporting - https://github.com/Homebrew/brew/blob/master/docs/Analytics.md
export HOMEBREW_NO_ANALYTICS=1
# Disable warning about insecure completion-dependent directories
ZSH_DISABLE_COMPFIX=true
# Actually load Oh-My-Zsh
source "${ZSH}/oh-my-zsh.sh"
unalias rm # No interactive rm by default (brought by plugins/common-aliases)
unalias lt # we need `lt` for https://github.com/localtunnel/localtunnel
# Load rbenv if installed (to manage your Ruby versions)
export PATH="${HOME}/.rbenv/bin:${PATH}" # Needed for Linux/WSL
type -a rbenv > /dev/null && eval "$(rbenv init -)"
# Load pyenv (to manage your Python versions)
export PYENV_VIRTUALENV_DISABLE_PROMPT=1
type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)" && RPROMPT+='[🐍 $(pyenv version-name)]'
# Load nvm (to manage your node versions)
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
# Call `nvm use` automatically in a directory with a `.nvmrc` file
autoload -U add-zsh-hook
load-nvmrc() {
if nvm -v &> /dev/null; then
local node_version="$(nvm version)"
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
if [ "$nvmrc_node_version" = "N/A" ]; then
nvm install
elif [ "$nvmrc_node_version" != "$node_version" ]; then
nvm use --silent
fi
elif [ "$node_version" != "$(nvm version default)" ]; then
nvm use default --silent
fi
fi
}
type -a nvm > /dev/null && add-zsh-hook chpwd load-nvmrc
type -a nvm > /dev/null && load-nvmrc
# Rails and Ruby uses the local `bin` folder to store binstubs.
# So instead of running `bin/rails` like the doc says, just run `rails`
# Same for `./node_modules/.bin` and nodejs
export PATH="./bin:./node_modules/.bin:${PATH}:/usr/local/sbin"
# Store your own aliases in the ~/.aliases file and load the here.
[[ -f "$HOME/.aliases" ]] && source "$HOME/.aliases"
# Encoding stuff for the terminal
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export BUNDLER_EDITOR=code
export EDITOR=code
# Set ipdb as the default Python debugger
export PYTHONBREAKPOINT=ipdb.set_trace
# sudo /etc/init.d/postgresql start
export DISPLAY=:0
export PATH=/usr/local/bin:$PATH
export PATH="/opt/homebrew/opt/curl/bin:$PATH"
export PATH="/opt/homebrew/opt/curl/bin:$PATH"
PATH="/opt/homebrew/opt/python@3.11/bin:$PATH"
PATH="/opt/homebrew/opt/python@2.7.18/bin:$PATH"
PYTHON="/opt/homebrew/opt/python@2.7.18/bin/python3.11"
# Add PHPCS (phpcs)
export PATH="/Users/samuelpaget/.nvm/versions/node/v16.15.1/bin:/Users/samuelpaget/.nvm/versions/node/v11.5.0/bin:/Users/samuelpaget/.nvm/versions/node/v16.15.1/bin:/Users/samuelpaget/.nvm/versions/node/v11.5.0/bin:/Users/samuelpaget/.nvm/versions/node/v16.15.1/bin:/opt/homebrew/opt/python@2.7.18/bin:/opt/homebrew/opt/python@3.11/bin:/opt/homebrew/opt/curl/bin:/opt/homebrew/opt/curl/bin:/usr/local/bin:./bin:./node_modules/.bin:/Users/samuelpaget/.nvm/versions/node/v16.15.1/bin:/Users/samuelpaget/.pyenv/shims:/Users/samuelpaget/.rbenv/shims:/Users/samuelpaget/.rbenv/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/samuelpaget/.pyenv/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin/python3:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/samuelpaget/.cargo/bin:/usr/local/sbin:~/.composer/vendor/bin"
# Add PHPCS (phpcs)
export PATH="/Users/samuelpaget/.nvm/versions/node/v16.15.1/bin:/Users/samuelpaget/.nvm/versions/node/v11.5.0/bin:/Users/samuelpaget/.nvm/versions/node/v16.15.1/bin:/Users/samuelpaget/.nvm/versions/node/v11.5.0/bin:/Users/samuelpaget/.nvm/versions/node/v16.15.1/bin:/opt/homebrew/opt/python@2.7.18/bin:/opt/homebrew/opt/python@3.11/bin:/opt/homebrew/opt/curl/bin:/opt/homebrew/opt/curl/bin:/usr/local/bin:./bin:./node_modules/.bin:/Users/samuelpaget/.nvm/versions/node/v16.15.1/bin:/Users/samuelpaget/.pyenv/shims:/Users/samuelpaget/.rbenv/shims:/Users/samuelpaget/.rbenv/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/samuelpaget/.pyenv/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin/python3:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/samuelpaget/.cargo/bin:/usr/local/sbin:~/.composer/vendor/bin:~/.composer/vendor/bin"