zsh/zshrc

66 lines
1.3 KiB
Bash
Raw Normal View History

HISTFILE=~/.histfile
HISTSIZE=100000
SAVEHIST=100000
unsetopt histsavenodups
2014-06-27 05:45:18 +00:00
setopt autocd extendedglob notify correct autonamedirs
setopt list_ambiguous autopushd pushd_ignore_dups
setopt hist_ignore_space share_history
#setopt hist_ignore_all_dups
setopt no_auto_remove_slash auto_param_slash
setopt completeinword
setopt chase_links
setopt short_loops
setopt cdable_vars
2020-04-02 16:21:55 +00:00
WORDCHARS=${WORDCHARS//\/}
export ZDOTDIR=${ZDOTDIR:-$HOME/.zsh}
2020-02-13 13:21:42 +00:00
function exists { command -v "$@" >/dev/null }
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
}
try-source() {
for i in "$@"; do
if [[ -e "$i" ]]; then
source $i
fi
done
}
exists() { command -v "$@" >/dev/null }
2019-05-14 12:45:13 +00:00
local dirfile=$(zdotfile dirs)
try-source $dirfile
2019-05-14 12:45:13 +00:00
2019-02-11 14:36:37 +00:00
. $(zdotfile completion.zsh)
source $(zdotfile zplug.zsh)
. $(zdotfile bindings.zsh)
2016-01-05 02:45:19 +00:00
stty -ixon
for i in ${ZDOTDIR:+$ZDOTDIR/aliases/*~*.zwc(N)} /etc/zsh/aliases/*~*.zwc(N); do
2016-01-05 03:34:13 +00:00
. $i
done
if ! (grep -q 'local' <<<$PATH && grep -q 'sbin' <<<$PATH); then
. /etc/zsh/zprofile
fi
2018-05-14 13:09:22 +00:00
FZF_ALT_C_COMMAND="fd -t d"
2020-02-13 13:21:42 +00:00
if exists stack; then
eval "$(stack --bash-completion-script stack)"
fi
exists todo && todo
exists thefuck && eval $(thefuck --alias)