2021-12-29 19:14:18 +01:00
|
|
|
# vim:sts=2:sw=2:ft=zsh
|
|
|
|
|
2021-12-30 00:18:22 +01:00
|
|
|
# Base directories for dotfiles.
|
|
|
|
export DOTFILES=~/.dotfiles
|
2021-12-30 00:39:38 +01:00
|
|
|
# Autocompletion
|
2022-01-01 01:03:34 +01:00
|
|
|
export FPATH=${DOTFILES}/zsh/functions:${FPATH}
|
2021-12-30 00:18:22 +01:00
|
|
|
|
2021-12-30 01:15:29 +01:00
|
|
|
# Base autoloading
|
2022-01-01 01:03:34 +01:00
|
|
|
autoload -Uz compaudit compinit
|
2021-12-30 01:15:29 +01:00
|
|
|
compinit
|
|
|
|
|
2021-12-29 19:14:18 +01:00
|
|
|
# zsh packages from system
|
2022-01-01 01:03:34 +01:00
|
|
|
uname -a | grep -qi 'debian' && source ${DOTFILES}/zsh/debian.base.zsh
|
2023-01-20 23:01:29 +01:00
|
|
|
uname -a | grep -qi 'ubuntu' && source /usr/share/powerlevel9k/powerlevel9k.zsh-theme
|
2022-01-01 01:03:34 +01:00
|
|
|
uname -a | grep -qi 'manjaro' && source /usr/share/zsh/manjaro-zsh-config && source /usr/share/zsh/manjaro-zsh-prompt
|
|
|
|
uname -a | grep -qi 'archlinux' && source ${DOTFILES}/zsh/archlinux.base.zsh
|
2022-01-01 01:06:30 +01:00
|
|
|
test -f /etc/redhat-release && grep -qi centos /etc/redhat-release && source ${DOTFILES}/zsh/centos.base.zsh
|
2021-12-29 19:14:18 +01:00
|
|
|
|
|
|
|
# Plugins
|
2021-12-30 01:21:38 +01:00
|
|
|
for plugin in `find $DOTFILES/zsh/plugins -type f -iname \*.plugin.zsh -print`; do
|
2022-01-01 00:01:25 +01:00
|
|
|
if [ -f /etc/redhat-release ]; then
|
2022-01-01 00:20:26 +01:00
|
|
|
if [ "$(basename ${plugin})" != 'fzf.plugin.zsh' ]; then
|
2022-01-01 00:01:25 +01:00
|
|
|
source $plugin
|
|
|
|
fi
|
2022-01-01 00:21:02 +01:00
|
|
|
else
|
|
|
|
source $plugin
|
2022-01-01 00:01:25 +01:00
|
|
|
fi
|
2021-12-30 01:21:38 +01:00
|
|
|
done
|
2021-12-29 19:14:18 +01:00
|
|
|
|
|
|
|
# EDITOR
|
|
|
|
export EDITOR="/usr/bin/vim"
|
|
|
|
|
|
|
|
# FZF default options
|
2022-01-01 01:03:34 +01:00
|
|
|
[ -x `which fzf 2>/dev/null` ] && export FZF_DEFAULT_OPTS="--multi --no-mouse --ansi --color=dark"
|
2021-12-29 19:14:18 +01:00
|
|
|
|
|
|
|
# Loading rvm if exists
|
|
|
|
[ -f /etc/profile.d/rvm.sh ] && source /etc/profile.d/rvm.sh
|
|
|
|
|
|
|
|
# Loading additional aliases
|
2021-12-30 01:22:40 +01:00
|
|
|
for file in `find $DOTFILES/zsh/aliases -type f -iname \*.aliases.zsh -print`; do
|
|
|
|
source $file
|
2021-12-30 01:21:38 +01:00
|
|
|
done
|