-
Notifications
You must be signed in to change notification settings - Fork 1
/
zshrc.symlink
74 lines (58 loc) · 2.73 KB
/
zshrc.symlink
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
# Use hard limits, except for a smaller stack and no core dumps
unlimit
limit stack 8192
limit core 0
limit -s
umask 022
# Shell functions
#setenv() { typeset -x "${1}${1:+=}${(@)argv[2,$#]}" } # csh compatibility
freload() { while (( $# )); do; unfunction $1; autoload -U $1; shift; done }
# Autoload all shell functions from all directories in $fpath (following
# symlinks) that have the executable bit on (the executable bit is not
# necessary, but gives you an easy way to stop the autoloading of a
# particular shell function). $fpath should not be empty for this to work.
for func in $^fpath/*(N-.x:t); autoload $func
# automatically remove duplicates from these arrays
typeset -U path cdpath fpath manpath
#m# k Shift-tab Perform backwards menu completion
if [[ -n "$terminfo[kcbt]" ]]; then
bindkey "$terminfo[kcbt]" reverse-menu-complete
elif [[ -n "$terminfo[cbt]" ]]; then # required for GNU screen
bindkey "$terminfo[cbt]" reverse-menu-complete
fi
#k# Trigger menu-complete
bindkey '\ei' menu-complete # menu completion via esc-i
# caching
[[ -d $ZSHDIR/cache ]] && zstyle ':completion:*' use-cache yes && \
zstyle ':completion::complete:*' cache-path $ZSHDIR/cache/
bindkey '\e[A' up-line-or-search # cursor up
bindkey '\e[B' down-line-or-search # <ESC>-
# Set/unset shell options
setopt notify globdots correct pushdtohome cdablevars autolist
setopt correctall autocd recexact longlistjobs
setopt autoresume histignoredups pushdsilent noclobber
setopt autopushd pushdminus extendedglob rcquotes mailwarning
unsetopt bgnice autoparamslash
# Autoload zsh modules when they are referenced
zmodload -a zsh/zpty zpty
zmodload -a zsh/zprof zprof
zmodload -ap zsh/mapfile mapfile
# stat(1) is now commonly an external command, so just load zstat
zmodload -aF zsh/stat b:zstat
bindkey '^I' complete-word # complete on tab, leave expansion to _expand
unsetopt nomatch # unset if for the checks, set it afterwards again.
# if you don't like the no matches found error messages,
# comment the setopt nomatch out below
# public repro zsh config files
if [ "`ls $HOME/.dotfiles/zsh/*.zsh 2> /dev/null | wc -l`" != 0 ]; then
for config_file (~/.dotfiles/zsh/*.zsh) source $config_file
fi
# private repro zsh config files
if [ "`ls $HOME/.dotfiles/privatedots/zsh/*.zsh 2> /dev/null | wc -l`" != 0 ]; then
for config_file (~/.dotfiles/privatedots/zsh/*.zsh) source $config_file
fi
setopt nomatch
[[ -s "$HOME/.rvm/scripts/rvm" ]] && export PATH=$PATH:$HOME/.rvm/bin && source "$HOME/.rvm/scripts/rvm"
if which rbenv > /dev/null; then export PATH="$HOME/.rbenv/bin:$PATH" && eval "$(rbenv init -)"; fi
[[ -f "$HOME/.acme.sh/acme.sh" ]] && . "/$HOME/.acme.sh/acme.sh.env"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh