-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathzshrc
99 lines (75 loc) · 2.1 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
###
### ZSH
###
# ZSH path
export ZSH=$HOME/.zsh
# ZSH theme
ZSH_THEME="yannlugrin"
# Locale
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# load auto completion from homebrew pacakge
if [ -d /usr/local/share/zsh/site-functions ]; then
fpath=(/usr/local/share/zsh/site-functions $fpath)
fi
# load our own completion functions
fpath=($ZSH/completion $fpath)
# completion
autoload -U compinit
compinit -d "$ZSH/.zcompdump"
# load custom executable functions
for function in $ZSH/functions/*; do
source $function
done
# enable colored output from ls, etc
export CLICOLOR=1
# history settings
setopt hist_ignore_all_dups inc_append_history
HISTFILE=~/.zhistory
HISTSIZE=4096
SAVEHIST=4096
# awesome cd movements from zshkit
setopt autocd autopushd pushdminus pushdsilent pushdtohome
DIRSTACKSIZE=3
# Enable extended globbing
setopt extendedglob
# Completion is case insentitive
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
# handy keybindings
bindkey "^A" beginning-of-line
bindkey "^E" end-of-line
bindkey "^R" history-incremental-search-backward
bindkey "^P" history-search-backward
# use vim as the visual editor
export VISUAL=vim
export EDITOR=$VISUAL
# rbenv
if command -v rbenv >/dev/null 2>&1; then
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
fi
# Dotfiles scripts
export PATH="$HOME/.dotfiles/bin:$PATH"
# Home bins
export PATH="$HOME/.local/bin:$HOME/bin:$PATH"
# Composer global bin
export PATH="$HOME/.composer/vendor/bin:$PATH"
# repository bin - mkdir .git/safe in the root of repositories you trust
export PATH=".git/safe/../../bin:$PATH"
export PATH=".git/safe/../../vendor/bin:$PATH"
export PATH=".git/safe/../../node_modules/.bin:$PATH"
# aliases
[[ -f ~/.aliases ]] && source ~/.aliases
# load plugins
for plugin in $ZSH/plugins/*/*.zsh; do
source $plugin
done
# load zsh theme
if [ -f "$ZSH/themes/$ZSH_THEME.zsh-theme" ]; then
source "$ZSH/themes/$ZSH_THEME.zsh-theme"
fi
# bun completions
[ -s "/home/yann/.bun/_bun" ] && source "/home/yann/.bun/_bun"
# bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"