Aggiunto supporto a ArchLinux base.
This commit is contained in:
parent
08fdc8396c
commit
f282e9abf8
3 changed files with 61 additions and 33 deletions
39
zshrc
39
zshrc
|
@ -3,40 +3,17 @@
|
|||
# Base directories for dotfiles.
|
||||
export DOTFILES=~/.dotfiles
|
||||
# Autocompletion
|
||||
export FPATH=$DOTFILES/zsh/functions:$FPATH
|
||||
export FPATH=${DOTFILES}/zsh/functions:${FPATH}
|
||||
|
||||
# Base autoloading
|
||||
autoload -Uz compaudit compinit vcs_info
|
||||
autoload -Uz compaudit compinit
|
||||
compinit
|
||||
|
||||
# zsh packages from system
|
||||
if uname -a | grep -qi 'debian'; then
|
||||
# Options for debian
|
||||
if [ -e $DOTFILES/zsh/debian.base.zsh ]; then
|
||||
source $DOTFILES/zsh/debian.base.zsh
|
||||
fi
|
||||
# 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
|
||||
elif [ -f /etc/redhat-release ] && grep -qi centos /etc/redhat-release; then
|
||||
# CentOS 7: non c'è un sacco di roba. Mi limito ad abilitare le opzioni native
|
||||
source $DOTFILES/zsh/centos.base.zsh
|
||||
fi
|
||||
uname -a | grep -qi 'debian' && source ${DOTFILES}/zsh/debian.base.zsh
|
||||
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
|
||||
test -f /etc/redhat-release ] && grep -qi centos /etc/redhat-release && source ${DOTFILES}/zsh/centos.base.zsh
|
||||
|
||||
# Plugins
|
||||
for plugin in `find $DOTFILES/zsh/plugins -type f -iname \*.plugin.zsh -print`; do
|
||||
|
@ -53,9 +30,7 @@ done
|
|||
export EDITOR="/usr/bin/vim"
|
||||
|
||||
# FZF default options
|
||||
if [ -x `which fzf 2>/dev/null` ]; then
|
||||
export FZF_DEFAULT_OPTS="--multi --no-mouse --ansi --color=dark"
|
||||
fi
|
||||
[ -x `which fzf 2>/dev/null` ] && 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…
Add table
Add a link
Reference in a new issue