2013-03-15 07:37:33 +00:00
|
|
|
HISTFILE=~/.histfile
|
|
|
|
HISTSIZE=100000
|
|
|
|
SAVEHIST=100000
|
2017-03-06 16:15:09 +00:00
|
|
|
unsetopt histsavenodups
|
|
|
|
|
2014-06-27 05:45:18 +00:00
|
|
|
|
2013-03-15 07:37:33 +00:00
|
|
|
setopt autocd extendedglob notify correct autonamedirs
|
|
|
|
setopt list_ambiguous autopushd pushd_ignore_dups
|
2017-03-06 16:15:09 +00:00
|
|
|
setopt hist_ignore_space share_history
|
|
|
|
#setopt hist_ignore_all_dups
|
2013-03-15 07:37:33 +00:00
|
|
|
setopt no_auto_remove_slash auto_param_slash
|
|
|
|
setopt completeinword
|
|
|
|
setopt chase_links
|
|
|
|
setopt short_loops
|
|
|
|
setopt cdable_vars
|
|
|
|
|
2019-02-01 10:13:51 +00:00
|
|
|
export ZDOTDIR=${ZDOTDIR:-$HOME/.zsh}
|
|
|
|
|
2016-07-25 11:48:52 +00:00
|
|
|
# get a file from ZDOTDIR, return file in /etc/zsh if it does not exist
|
|
|
|
zdotfile() {
|
|
|
|
if [[ -e $ZDOTDIR/$1 ]]; then
|
|
|
|
echo $ZDOTDIR/$1
|
|
|
|
else
|
|
|
|
echo /etc/zsh/$1
|
|
|
|
fi
|
|
|
|
}
|
2013-03-15 07:37:33 +00:00
|
|
|
|
2019-05-14 12:45:13 +00:00
|
|
|
local dirfile=$(zdotfile dirs)
|
|
|
|
if [[ -e $dirfile ]]; then
|
|
|
|
source $dirfile
|
|
|
|
fi
|
|
|
|
|
2019-02-11 14:36:37 +00:00
|
|
|
. $(zdotfile completion.zsh)
|
|
|
|
source $(zdotfile zplug.zsh)
|
|
|
|
|
2013-03-15 07:37:33 +00:00
|
|
|
bindkey -v
|
|
|
|
|
2014-06-27 05:42:56 +00:00
|
|
|
function exists { command -v "$@" >/dev/null }
|
2016-11-23 08:59:35 +00:00
|
|
|
ZMODLOAD_BLACKLIST=( ssh-agent )
|
2016-01-05 02:45:19 +00:00
|
|
|
|
2013-03-15 07:37:33 +00:00
|
|
|
stty -ixon
|
|
|
|
|
2016-07-25 11:48:52 +00:00
|
|
|
. $(zdotfile modules/loader.zsh) && mod_init
|
2013-03-15 07:37:33 +00:00
|
|
|
|
2019-02-01 10:13:51 +00:00
|
|
|
for i in ${ZDOTDIR:+$ZDOTDIR/aliases/*~*.zwc(N)} /etc/zsh/aliases/*~*.zwc(N); do
|
2016-01-05 03:34:13 +00:00
|
|
|
. $i
|
|
|
|
done
|
|
|
|
|
2013-03-15 07:37:33 +00:00
|
|
|
echo $PATH | grep -q 'local' || . /etc/zsh/zprofile
|
|
|
|
echo $PATH | grep -q 'sbin' || . /etc/zsh/zprofile
|
|
|
|
|
|
|
|
|
2018-05-14 13:09:22 +00:00
|
|
|
FZF_ALT_C_COMMAND="fd -t d"
|
|
|
|
[[ -e /usr/share/doc/fzf/key-bindings.zsh ]] && . /usr/share/doc/fzf/key-bindings.zsh
|
|
|
|
|
2014-06-27 05:42:56 +00:00
|
|
|
exists todo && todo
|