-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot.zshrc
111 lines (91 loc) · 2.89 KB
/
dot.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
#!/bin/zsh
# dotfile target: ~/.zshrc
# Use VI keybindings!
bindkey -v
set -o vi
export EDITOR=vim
# When you are too lazy for "Esc /"
bindkey "^R" history-incremental-search-backward
export GREP_COLOR="auto"
# See Brewfile for specific versions
typeset -U path
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}"
export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"
export PATH="/opt/homebrew/opt/postgresql@15/bin:$PATH"
# Smarter "cd"
setopt auto_cd
cdpath=(~/repos/*)
# Surely this won't annoy me
setopt correct
# The following lines were added by compinstall
zstyle :compinstall filename ~/.zshrc
autoload -Uz compinit
compinit
# End of lines added by compinstall
# TODO(tom): Move this to a profile file?
# Some scripts are broken in /usr/local/share/zsh/site-functions ?
for f in \
/opt/homebrew/share/zsh/site-functions/_aws \
/opt/homebrew/share/zsh/site-functions/_black \
/opt/homebrew/share/zsh/site-functions/_gh \
/opt/homebrew/share/zsh/site-functions/_lein \
/opt/homebrew/share/zsh/site-functions/aws_zsh_completer.sh \
; do
test -f "$f" && source "$f"
done
# Aliases shared across shells
if [ -r ~/.aliases ]; then
source ~/.aliases
fi
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt append_history
setopt share_history
# End of lines configured by zsh-newuser-install
setopt hist_ignoredups
# Allow '#' in interactive shell
setopt interactivecomments
# Begin of vcs_info: Adding version control info to prompt
setopt prompt_subst
setopt prompt_percent
autoload -Uz vcs_info
precmd() { vcs_info }
zstyle ':vcs_info:git:*' check-for-changes true
# Default: " (%s)-[%b]%u%c-"
zstyle ':vcs_info:git:*' formats '%F{green}%b%f%F{red}%u%c%f'
# Default: " (%s)-[%b|%a]%u%c-"
zstyle ':vcs_info:git:*' actionformats '%s-%a %F{green}%b%f%F{red}%u%c%f'
if [ -n "$SSH_CLIENT" ]; then
PROMPT="[\$vcs_info_msg_0_] %F{blue}%n@%m%f %F{cyan}%2~%f %# "
else
PROMPT="[\$vcs_info_msg_0_] %F{cyan}%2~%f %# "
fi
# End of vcsinfo
# Zsh Line Editor (zshzle)
ZLE_RPROMPT_INDENT=1
# NVM configuration (see "brew info nvm")
export NVM_DIR="$HOME/.nvm"
source "/opt/homebrew/opt/nvm/nvm.sh"
# Prelim:
# brew install miniconda
# conda init "$(basename "${SHELL}")" #=> see below
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/opt/homebrew/Caskroom/miniconda/base/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh" ]; then
. "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh"
else
export PATH="/opt/homebrew/Caskroom/miniconda/base/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
# Prelim:
# conda create --name code
test -d /opt/homebrew/Caskroom/miniconda/base/envs/code && conda activate code
export DOTFILES_LOADED_ZSHRC=$SHLVL