-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshrc
78 lines (58 loc) · 2.42 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
# zmodload zsh/zprof
if [[ $TERM_PROGRAM == "Apple_Terminal"
|| $TERM_PROGRAM == "ghostty" || $TERM_PROGRAM == "vscode"
|| $TERM_PROGRAM == "zed" || $TERM_PROGRAM == "iTerm.app" ]]; then
# More ZSH completion stuff
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# Atuin
export ATUIN_NOBIND="true"
[[ -x $(brew --prefix)/bin/atuin ]] && eval "$(atuin init zsh)"
# # bindkey "^[[A" history-beginning-search-backward
[[ -x $(brew --prefix)/bin/atuin ]] && bindkey '^r' _atuin_search_widget
[[ -x $(brew --prefix)/bin/starship ]] && eval "$(starship init zsh)"
fi
if [[ $TERM_PROGRAM == "WarpTerminal" ]]; then
# Warp does not need fzf or Atuin as it is all built in
[[ -x $(brew --prefix)/bin/starship ]] && eval "$(starship init zsh)"
fi
# ZSH completion stuff
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
# Location for post install script to install non-hombrew software completions
FPATH="$HOME/.zfunc:$FPATH"
autoload -Uz compinit
compinit
fi
# Stuff for if we want to use Bash completion in ZSH
# autoload -U +X bashcompinit && bashcompinit
# source /opt/homebrew/etc/bash_completion.d/kubie.bash
# My aliases
alias ll="ls -lah"
# Python Stuff
if [[ -x $(brew --prefix)/bin/pyenv ]]; then
eval "$(pyenv init -)"
export PYENV_VIRTUALENV_DISABLE_PROMPT=1
eval "$(pyenv virtualenv-init -)"
fi
export POETRY_VIRTUALENVS_IN_PROJECT=true
export PATH="$HOME/.poetry/bin:$PATH"
# Some env vars
export HOMEBREW_BUNDLE_NO_LOCK=true
export HOMEBREW_BUNDLE_FILE=$HOME/.Brewfile
# Some paths
[[ -x $(brew --prefix)/opt/[email protected] ]] && export PATH="$(brew --prefix)/opt/[email protected]/bin:$PATH"
export PATH="$HOME/go/bin:$PATH"
export PATH="$HOME/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
# If coreutils are installed export path so they are used instead of Macos utils
[[ -x $(brew --prefix)/opt/coreutils ]] && export PATH="$(brew --prefix)/opt/coreutils/libexec/gnubin:$PATH"
# Even More ZSH completion stuff
[[ -f $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]] && source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# direnv
[[ -x $(brew --prefix)/bin/direnv ]] && eval "$(direnv hook zsh)"
# asdf
[[ -x $(brew --prefix)/bin/asdf ]] && . "$(brew --prefix asdf)/libexec/asdf.sh"
# 1Password
[[ -x $HOME/.config/op/plugins.sh ]] && source $HOME/.config/op/plugins.sh
# AWSume
[[ -x $(brew --prefix)/bin/awsume ]] && alias awsume=". awsume"