-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
57 lines (44 loc) · 1.71 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
# Use zsh's vcs_info to show git branches in the prompt
autoload -Uz vcs_info
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:git*' formats "%b"
zstyle ':vcs_info:git*' actionformats "%b|%a"
autoload add-zsh-hook
add-zsh-hook precmd vcs_info
setopt prompt_subst
PROMPT="%{%F{yellow}%}%~%{%f%}> "
RPROMPT='%{%F{red}%}${vcs_info_msg_0_}%{%f%}'
export CLICOLOR="Yes" EDITOR="vim"
# Use ripgrep to generate file lists for fzf
export FZF_DEFAULT_COMMAND='rg --files --hidden --no-ignore-vcs --vimgrep'
eval "$(/opt/homebrew/bin/brew shellenv)"
# Use arrow keys with a partially completed command to search history
bindkey '^[[A' history-beginning-search-backward
bindkey '^[[B' history-beginning-search-forward
# Language version managers
eval "$(rbenv init - zsh)"
eval "$(nodenv init -)"
. /opt/homebrew/opt/asdf/libexec/asdf.sh
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
# Postgres tools on our path
export PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH"
# Enable autocompletion
autoload -Uz compinit
compinit -C
# ruby-build installs a non-Homebrew OpenSSL for each Ruby version installed
# and these are never upgraded.
#
# To link Rubies to Homebrew's OpenSSL 1.1 (which is upgraded) add the following
# to your ~/.zshrc:
#
# Note: this may interfere with building old versions of Ruby (e.g <2.4) that use
# OpenSSL <1.1.
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix [email protected])"
# https://bugs.ruby-lang.org/issues/14009
# https://github.com/rails/rails/issues/38560
# https://github.com/rbenv/ruby-build/issues/1385
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
# Optional local config
source ~/.zshrc_local