54 lines
1.4 KiB
Bash
54 lines
1.4 KiB
Bash
# vim:sts=2:sw=2:ft=zsh
|
|
|
|
# Base directories for dotfiles.
|
|
export DOTFILES=~/.dotfiles
|
|
# Autocompletion
|
|
export FPATH=$DOTFILES/zsh/functions:$FPATH
|
|
|
|
# Enables base completion
|
|
autoload -Uz compaudit compinit vcs_info
|
|
zstyle ':vcs_info:*' enable git svn
|
|
precmd() {
|
|
vcs_info
|
|
}
|
|
setopt prompt_subst
|
|
|
|
# zsh packages from system
|
|
if uname -a | grep -qi 'debian'; then
|
|
# For Debian, it requires two packages
|
|
if [ -e /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then
|
|
source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
|
fi
|
|
if [ -e /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then
|
|
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
|
fi
|
|
#
|
|
# Theme
|
|
source $DOTFILES/zsh/themes/gentoo.zsh-theme
|
|
elif uname -a | grep -qi '\(arch\|manjaro\)'; then
|
|
# Archlinux or manjaro
|
|
if [ -e /usr/share/zsh/manjaro-zsh-config ]; then
|
|
source /usr/share/zsh/manjaro-zsh-config
|
|
fi
|
|
if [ -e /usr/share/zsh/manjaro-zsh-prompt ]; then
|
|
source /usr/share/zsh/manjaro-zsh-prompt
|
|
fi
|
|
fi
|
|
|
|
# Plugins
|
|
for plugin in `find $DOTFILES -type f -iname \*.plugin.zsh -print`; do
|
|
source $plugin
|
|
done
|
|
|
|
# EDITOR
|
|
export EDITOR="/usr/bin/vim"
|
|
|
|
# FZF default options
|
|
export FZF_DEFAULT_OPTS="--multi --no-mouse --ansi --color=dark"
|
|
|
|
# Loading rvm if exists
|
|
[ -f /etc/profile.d/rvm.sh ] && source /etc/profile.d/rvm.sh
|
|
|
|
# Loading additional aliases
|
|
source ~/.dotfiles/zsh/aliases/*.aliases.zsh
|