forked from skwp/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.zshrc
55 lines (46 loc) · 1.5 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
#
# Executes commands at the start of an interactive session.
#
# Authors:
# Sorin Ionescu <[email protected]>
#
PROFILING_ZSH_START=false
profile_script_start() {
if [ "$PROFILING_ZSH_START" = true ]; then
date "+%T.%3N start $1"
fi
}
profile_script_end() {
if [ "$PROFILING_ZSH_START" = true ]; then
date "+%T.%3N end $1"
fi
}
export ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20
# put after prezto
profile_script_start "brew init"
# better performance than 'brew --prefix'
if [[ $(uname -m) == "arm64" ]]; then
BREW_PREFIX="/opt/homebrew"
fpath=($BREW_PREFIX/share/zsh/functions $BREW_PREFIX/share/zsh/site-functions $fpath)
else
BREW_PREFIX="/usr/local"
fi
[ -f $BREW_PREFIX/bin/brew ] && eval "$($BREW_PREFIX/bin/brew shellenv)"
profile_script_start "Prezto init"
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
profile_script_start "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
profile_script_start "customize init"
# Customize to your needs...
for config_file ($HOME/.yadr/zsh/*.zsh) profile_script_start "$config_file" && source $config_file
profile_script_start "completion path"
fpath=(~/.zsh/completion $fpath)
source "${HOME}/.asdf/asdf.sh"
fpath=(${ASDF_DIR}/completions $fpath)
zstyle ':completion::complete:*' use-cache 1
profile_script_start "completion init"
autoload -Uz compinit && compinit
export PATH="$HOME/bin:$HOME/.local/bin:$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
export HOSTNAME=$HOST