Eliminazione external. Antigen caricato nel repo.

This commit is contained in:
Emiliano Vavassori 2023-12-29 18:42:39 +01:00
parent e408b628ee
commit 3d48b0cdaf
4 changed files with 2069 additions and 22 deletions

2
.gitignore vendored
View File

@ -1,5 +1,3 @@
zsh/external
zsh/plugins/zsh-ssh.plugin.zsh
zsh/distro.base.zsh
vim/autoload/plug.vim
vim/plugged

View File

@ -31,17 +31,6 @@ if [[ ! -f "$HOME/.zshrc" ]]; then
ln -sf ${DOTFILES}/zsh/distro/centos.base.zsh ${DOTFILES}/zsh/distro.base.zsh
fi
# Installing better ssh completion with fzf and ssh_config Include with:
# https://github.com/sunlei/zsh-ssh
mkdir -p ${DOTFILES}/zsh/external
git clone https://github.com/sunlei/zsh-ssh.git ${DOTFILES}/zsh/external/zsh-ssh
ln -sf ${DOTFILES}/zsh/external/zsh-ssh/zsh-ssh.zsh ${DOTFILES}/zsh/plugins/zsh-ssh.plugin.zsh
# Using Antigen for plugins
# https://github.com/zsh-users/antigen
git clone https://github.com/zsh-users/antigen.git ${DOTFILES}/zsh/external/antigen
ln -sf ${DOTFILES}/zsh/external/antigen/antigen.zsh ${DOTFILES}/zsh/plugins/antigen.plugin.zsh
cp "${DOTFILES}/zshrc" "$HOME/.zshrc"
fi

File diff suppressed because it is too large Load Diff

21
zshrc
View File

@ -4,7 +4,7 @@
export DOTFILES=${HOME}/.dotfiles
# Autocompletions
export FPATH=${DOTFILES}/zsh/functions:${FPATH}
export FPATH=${HOME}/.zsh/functions:${DOTFILES}/zsh/functions:${FPATH}
# Base autoloading
autoload -Uz compaudit compinit
@ -24,6 +24,16 @@ for plugin in `find $DOTFILES/zsh/plugins -iname \*.plugin.zsh -print`; do
fi
done
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 command-not-found
@ -39,6 +49,7 @@ antigen bundle sudo
antigen bundle systemadmin
antigen bundle systemd
antigen bundle z
antigen bundle sunlei/zsh-ssh
antigen apply
# EDITOR
@ -48,14 +59,6 @@ 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