From e689e1fdb9180b5ee3930d47242a0c9992317972 Mon Sep 17 00:00:00 2001 From: ravenhall Date: Mon, 9 May 2016 18:27:57 -0500 Subject: [PATCH] Initial plenv plugin created. Fails silently when plenv not found, only munges path if plenv path exists --- plugins/available/plenv.plugin.bash | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 plugins/available/plenv.plugin.bash diff --git a/plugins/available/plenv.plugin.bash b/plugins/available/plenv.plugin.bash new file mode 100644 index 00000000..1e527b72 --- /dev/null +++ b/plugins/available/plenv.plugin.bash @@ -0,0 +1,21 @@ +# plugin for plenv + +cite about-plugin +about-plugin 'plenv plugin for Perl' + +if [[ -e "${HOME}/.plenv/bin" ]] ; then + + # load plenv bin dir into path if it exists + pathmunge "${HOME}/.plenv/bin" + +fi + +if [[ `which plenv` ]] ; then + + # init plenv + eval "$(plenv init -)" + + # Load the auto-completion script if it exists. + [[ -e "${HOME}/.plenv/completions/plenv.bash" ]] && source "${HOME}/.plenv/completions/plenv.bash" + +fi