plugins/plenv: use _command_exists

This commit is contained in:
John D Pell
2021-09-19 21:54:54 -07:00
parent a31145335e
commit f0179c79ce
2 changed files with 9 additions and 10 deletions

View File

@@ -1,18 +1,16 @@
# shellcheck shell=bash
#
# 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"
if [[ -d "${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 - bash)"
if _command_exists plenv; then
# init plenv
eval "$(plenv init - bash)"
fi