From 812ed40e10052fbbc75a5fb670cf87b900acbd63 Mon Sep 17 00:00:00 2001 From: ravenhall Date: Fri, 6 May 2016 19:12:10 -0500 Subject: [PATCH] reworked plugin, user should install plenv separately --- plugins/available/plenv.plugin.bash | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/plugins/available/plenv.plugin.bash b/plugins/available/plenv.plugin.bash index 2950fc78..a3c21cfe 100644 --- a/plugins/available/plenv.plugin.bash +++ b/plugins/available/plenv.plugin.bash @@ -1,23 +1,17 @@ # Installs plenv and perl-build if not installed cite about-plugin -about-plugin 'Perl plenv plugin' +about-plugin 'plenv plugin for Perl' pathmunge "${HOME}/.plenv/bin" -[[ `which plenv` ]] && eval "$(plenv init -)" +if [[ `which plenv` ]] ; then -# What an incredible smell you've discovered! + # init plenv + eval "$(plenv init -)" -# detect bash -[[ $BASH ]] && SHELL_NAME='bash' + # Load the auto-completion script if it exists. + [[ -e ~/.plenv/completions/plenv.bash ]] && source ~/.plenv/completions/plenv.bash -# detect csh/tcsh - -# detect zsh -[[ $ZSH_NAME ]] && SHELL_NAME='zsh' - -# detect fish - -# Load the auto-completion script if plenv is installed. -[[ -e ~/.plenv/completions/plenv.${SHELL_NAME} ]] && source ~/.plenv/completions/plenv.${SHELL_NAME} +else echo "Unable to find plenv. See https://github.com/tokuhirom/plenv for installation" +fi