-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
executable file
·88 lines (66 loc) · 2.15 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
# .bashrc
#
# @author Charlie Revett (@revcd).
# oh-my-zsh configuration taken from their template .zshrc file (start)
# See: https://github.com/ohmyzsh/ohmyzsh/blob/master/templates/zshrc.zsh-template
# ---
# Personal.
# ---
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Uncomment one of the following lines to change the auto-update behavior.
zstyle ':omz:update' mode reminder # Just remind me to update when it's time.
# Uncomment the following line to enable command auto-correction.
ENABLE_CORRECTION="true"
# Disable themes.
ZSH_THEME=""
# Enable plugins.
plugins=(brew docker docker-compose git golang)
# Set up oh-my-zsh.
source $ZSH/oh-my-zsh.sh
# Disable autocorrect in Zsh.
# https://coderwall.com/p/jaoypq/disabling-autocorrect-in-zsh
unsetopt correct_all
# Include brew packages and apps within path (Apple Silicon only).
if [[ $(uname -m) == 'arm64' ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
# Add user go binaries to PATH.
export PATH=$PATH:~/go/bin
# Add Java to path, needed for OpenAPI generation.
export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"
# Set default editor.
export EDITOR='cursor -w'
# Configure Starship prompt.
# https://starship.rs
eval "$(starship init zsh)"
# Setup fzf (Apple Silicon only).
if [[ $(uname -m) == 'arm64' ]]; then
# Setup fzf
if [[ ! "$PATH" == */opt/homebrew/opt/fzf/bin* ]]; then
export PATH="${PATH:+${PATH}:}/opt/homebrew/opt/fzf/bin"
fi
source "/opt/homebrew/opt/fzf/shell/key-bindings.zsh"
fi
# Setup fzf (Intel only).
if [[ $(uname -m) == 'x86_64' ]]; then
if [[ ! "$PATH" == */opt/homebrew/opt/fzf/bin* ]]; then
export PATH="${PATH:+${PATH}:}/usr/local/opt/fzf/bin"
fi
source "/usr/local/opt/fzf/shell/key-bindings.zsh"
fi
# Set up autoenv.
# https://github.com/hyperupcall/autoenv
source $(brew --prefix autoenv)/activate.sh
# Set fnm environment variables.
# https://github.com/Schniz/fnm#shell-setup
eval "$(fnm env --use-on-cd)"
# Default to a specific version of Node.
fnm use v18.17.1
# ---
# Load other bash scripts.
# ---
for file in ~/projects/github.com/revett/dotfiles/.{functions,aliases}; do
[ -r "$file" ] && source "$file";
done;
unset file;