forked from HiDeoo/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc
85 lines (64 loc) · 1.55 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#
# Main
#
# Load brew completion definitions before Prezto & compinit.
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
autoload -Uz compinit
compinit
fi
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
# Source iTerm2 Shell Integration.
if [[ -s "${HOME}/.iterm2_shell_integration.zsh" ]]; then
source ${HOME}/.iterm2_shell_integration.zsh
fi
# Initialize brew.
source /usr/local/bin/brew_init
# Load extra tab-completions.
[ -f ~/.config/tabtab/zsh/__tabtab.zsh ] && source ~/.config/tabtab/zsh/__tabtab.zsh
#
# ZSH
#
# Increase history size.
export HISTSIZE=100000
export SAVEHIST=${HISTSIZE}
# Add a key binding (Ctrl + Space) to accept suggestions.
bindkey '^ ' autosuggest-accept
# Get aliases
if [ -f ~/.zsh_aliases ]; then
. ~/.zsh_aliases
fi
#
# macOS
#
# Configure the Homebrew Cask application directory.
export HOMEBREW_CASK_OPTS='--appdir=/Applications'
#
# Dev
#
# Configure Go.
export GOPATH="$HOME/.go"
#
# Node
#
# Configure the Node REPL.
export NODE_REPL_HISTORY_SIZE='10000';
# Lazy-load fnm.
eval "$(fnm env --use-on-cd)"
# Configure pnpm.
export PNPM_HOME="$HOME/Library/pnpm"
path=(
$PNPM_HOME
$path
)
# Returns the latest version of a package matching a given semver range.
latest() {
pnpm view $1 version | tail -n 1 | cut -d "'" -f 2
}
# Bump version numbers without Conventional Commits.
# https://github.com/antfu/bumpp
# https://github.com/JS-DevTools/version-bump-prompt
alias bump='pnpx bumpp --commit "v"'