dotfiles/zsh/.zshrc

48 lines
1.3 KiB
Bash

# global exports and options
export HISTSIZE=10000
export SAVEHIST=$HISTSIZE
export HISTFILE=$XDG_DATA_HOME/zsh/history
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_SAVE_NO_DUPS
setopt HIST_REDUCE_BLANKS
setopt SHARE_HISTORY
export LESSHISTFILE='/dev/null'
[ ! -L ~/.cache ] && { rm -rf ~/.cache; ln -sf $XDG_CACHE_HOME ~/.cache ; }
mkdir -p $XDG_DATA_HOME/zsh
mkdir -p $XDG_CACHE_HOME/zsh
zstyle ':completion:*' menu select
zstyle ':completion:*' list-colors ''
# keys
source $ZDOTDIR/keys.zsh
# aliases
source $ZDOTDIR/aliases.zsh
# ssh
source $ZDOTDIR/ssh.zsh
# plugins & addons
[ -f $XDG_CONFIG_HOME/fzf/fzf.zsh ] && source $ZDOTDIR/fzf.zsh
source $ZDOTDIR/modules/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# theme
source $ZDOTDIR/p10k.zsh
source $ZDOTDIR/modules/powerlevel10k/powerlevel10k.zsh-theme
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
export WD_CONFIG=$XDG_CONFIG_HOME/wd_list
wd () {
. $ZDOTDIR/modules/wd/wd.sh
}
fpath=($ZDOTDIR/modules/wd $fpath)
# local settings
source ~/.local/settings/zsh
[ ! -e $XDG_DATA_HOME/zsh/zcompdump.zwc ] && autoload -U zrecompile && zrecompile -p -R $XDG_DATA_HOME/zsh/zcompdump
autoload -U compinit && compinit -d $XDG_DATA_HOME/zsh/zcompdump