dotfiles/zshrc

69 lines
1.4 KiB
Bash

# vim:sts=2:sw=2:ft=zsh
# Base directories for dotfiles.
export DOTFILES=${HOME}/.dotfiles
# Autocompletions
export FPATH=${DOTFILES}/zsh/functions:${FPATH}
# Base autoloading
autoload -Uz compaudit compinit
compinit
# zsh packages from system
source ${DOTFILES}/zsh/distro.base.zsh
# Plugins
for plugin in `find $DOTFILES/zsh/plugins -iname \*.plugin.zsh -print`; do
if [ -f /etc/redhat-release ]; then
if [ "$(basename ${plugin})" != 'fzf.plugin.zsh' ]; then
source $plugin
fi
else
source $plugin
fi
done
# Antigen configuration
# the main pluing should have been sourced in the previous loop.
antigen bundle <<BUNDLES
command-not-found
common-aliases
copyfile
fd
fzf
git
pip
python
rsync
sudo
systemadmin
systemd
z
BUNDLES
antigen apply
# EDITOR
export EDITOR="/usr/bin/vim"
export ZSH_TMUX_CONFIG=${HOME}/.config/tmux/tmux.conf
# FZF default options
[ -x `which fzf 2>/dev/null` ] && export FZF_DEFAULT_OPTS="--multi --no-mouse --ansi --color=dark"
# Use Powerlevel10k if already found
if [[ -f ~/.p10k.zsh ]]; then
source ~/.p10k.zsh
fi
# Loading rvm if exists
[ -f /etc/profile.d/rvm.sh ] && source /etc/profile.d/rvm.sh
# Loading additional aliases
for file in `find $DOTFILES/zsh/aliases -iname \*.aliases.zsh -print`; do
source $file
done
for file in `find $DOTFILES/zsh/localconf.d -type f -iname \*.conf.zsh -print | sort`; do
source file
done