2017-02-20 10:02:49 -05:00
|
|
|
GPG_TTY=$(tty)
|
|
|
|
export GPG_TTY
|
|
|
|
|
2014-09-05 00:23:33 -04:00
|
|
|
# clean up duplicate paths
|
|
|
|
typeset -U PATH
|
|
|
|
|
2013-04-29 01:12:02 -04:00
|
|
|
# Larger history
|
2013-08-05 22:07:01 -04:00
|
|
|
HISTSIZE=20000
|
2013-04-29 01:12:02 -04:00
|
|
|
HISTFILE=~/.zsh_history
|
2013-08-05 22:07:01 -04:00
|
|
|
SAVEHIST=20000
|
2013-04-29 01:12:02 -04:00
|
|
|
|
2013-04-29 13:32:51 -04:00
|
|
|
# Make sure C-s works in vim
|
|
|
|
stty start undef
|
|
|
|
stty stop undef
|
|
|
|
|
|
|
|
# Aliases/Functions files
|
2013-04-29 01:14:37 -04:00
|
|
|
source $HOME/.aliases
|
2013-04-29 13:32:51 -04:00
|
|
|
source $HOME/.functions
|
2016-03-24 15:00:18 -04:00
|
|
|
|
2015-12-11 00:31:30 -05:00
|
|
|
source $HOME/.zsh/prompt
|
2013-04-29 01:14:37 -04:00
|
|
|
|
2014-10-23 18:03:58 -04:00
|
|
|
if [[ "$OSTYPE" == darwin* ]]; then
|
|
|
|
source $HOME/.aliases-mac
|
|
|
|
fi
|
|
|
|
|
2021-11-07 10:27:46 -05:00
|
|
|
# vim mode
|
|
|
|
bindkey -v
|
|
|
|
|
2013-05-28 23:32:51 -04:00
|
|
|
# Bind insert_sudo function
|
|
|
|
zle -N insert-sudo
|
|
|
|
bindkey "^z" insert-sudo
|
|
|
|
|
2017-01-03 17:25:46 -05:00
|
|
|
# init rbenv
|
2017-01-17 09:23:38 -05:00
|
|
|
if which rbenv > /dev/null; then
|
|
|
|
eval "$(rbenv init --no-rehash -)"
|
|
|
|
(rbenv rehash &) 2> /dev/null
|
2017-01-03 17:25:46 -05:00
|
|
|
fi
|
|
|
|
|
2021-05-21 08:15:34 -04:00
|
|
|
# init nodenv
|
2017-01-03 17:25:46 -05:00
|
|
|
if which nodenv > /dev/null; then
|
2017-01-17 09:23:38 -05:00
|
|
|
eval "$(nodenv init --no-rehash -)"
|
|
|
|
(nodenv rehash &) 2> /dev/null
|
2017-01-03 17:25:46 -05:00
|
|
|
fi
|
|
|
|
|
2021-05-13 09:35:10 -04:00
|
|
|
# init direnv
|
2020-04-23 09:14:43 -04:00
|
|
|
if which direnv > /dev/null; then
|
|
|
|
eval "$(direnv hook zsh)"
|
|
|
|
fi
|
|
|
|
|
2016-08-13 16:06:49 -04:00
|
|
|
# completion
|
|
|
|
autoload -U compinit
|
2021-03-31 23:31:05 -04:00
|
|
|
autoload bashcompinit && bashcompinit
|
2021-11-06 11:19:14 -04:00
|
|
|
|
|
|
|
autoload compinit -Uz
|
|
|
|
setopt EXTENDEDGLOB
|
|
|
|
if [[ -n ${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then
|
|
|
|
compinit
|
|
|
|
else
|
|
|
|
compinit -C
|
|
|
|
fi
|
|
|
|
unsetopt EXTENDEDGLOB
|
|
|
|
|
2016-08-13 16:06:49 -04:00
|
|
|
setopt completeinword
|
2016-08-15 10:05:09 -04:00
|
|
|
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
|
2016-08-13 16:06:49 -04:00
|
|
|
|
|
|
|
# directory
|
|
|
|
setopt auto_cd
|
2016-08-15 10:05:09 -04:00
|
|
|
|
|
|
|
# better word definition
|
|
|
|
autoload -U select-word-style
|
|
|
|
select-word-style bash
|
2020-02-27 09:46:58 -05:00
|
|
|
|
|
|
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|