-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.zshrc
72 lines (59 loc) · 2.18 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
#!/usr/bin/env zsh
# zsh history
HISTSIZE=100000
SAVEHIST=100000
HIST_IGNORE_SPACE=true
HIST_NO_STORE=true
HIST_NO_FUNCTIONS=true
export EDITOR='vim'
######
# PATH
######
export PATH=${PATH}:"${HOME}/.local/bin"
export PATH=${PATH}:"${HOME}/.pyenv/bin"
export PATH=${PATH}:"${HOME}/.poetry/bin"
export PATH=${PATH}:/usr/local/go/bin
export PATH=${PATH}:"${HOME}/Library/Application Support/JetBrains/Toolbox/scripts"
export PATH="/opt/nvim-linux64/bin:${PATH}"
##################
# EXTERNAL CONFIGS
# load first so they can be overriden by local configs
##################
[ -e /opt/homebrew/bin/brew ] && eval "$(/opt/homebrew/bin/brew shellenv)"
[ -e "${HOME}/.zsh/direnv.zsh" ] && source "${HOME}/.zsh/direnv.zsh"
[ -e "${HOME}/.zsh/oh-my-zsh.zsh" ] && source "${HOME}/.zsh/oh-my-zsh.zsh"
# [ -e "$(which fzf)" ] && eval "$(fzf --zsh)"
[ -e "${HOME}/.ondir/scripts.zsh" ] && source "${HOME}/.ondir/scripts.sh"
[ -e "${HOME}/.cargo/env" ] && source "${HOME}/.cargo/env"
if [[ -e "$(which fzf)" ]]; then
case "$(uname -s)" in
Linux)
source /usr/share/doc/fzf/examples/key-bindings.zsh
source /usr/share/doc/fzf/examples/completion.zsh
;;
Darwin)
eval "$(fzf --zsh)"
;;
*)
fail "Unsupported OS: $(uname -s)"
exit 1
;;
esac
fi
mkdir -p $HOME/.n
export N_PREFIX=$HOME/.n
export PATH=$N_PREFIX/bin:$PATH
###############
# LOCAL CONFIGS
###############
[ -e "${HOME}/.zsh/$(hostname).zsh" ] && source "${HOME}/.zsh/$(hostname).zsh"
[ -e "${HOME}/.zsh/abbreviations.zsh" ] && source "${HOME}/.zsh/abbreviations.zsh"
[ -e "${HOME}/.zsh/aliases.zsh" ] && source "${HOME}/.zsh/aliases.zsh"
[ -e "${HOME}/.zsh/functions.zsh" ] && source "${HOME}/.zsh/functions.zsh"
[ -e "${HOME}/.zsh/keybinds.zsh" ] && source "${HOME}/.zsh/keybinds.zsh"
[ -e "${HOME}/.zsh/ssh.zsh" ] && source "${HOME}/.zsh/ssh.zsh"
[ -e "${HOME}/.private.zsh" ] && source "${HOME}/.private.zsh"
# TODO: do I need anything here for Linux to load dircolors?
if [[ "$(uname -s)" == "Darwin" ]] && type gdircolors &> /dev/null ; then
eval "$(gdircolors)"
fi