Allow jump plugin to fail silently when jump not installed

Per recommendations from @nwinkler, allow the jump test to fail
silently. This helps in cases where users are SSH'ing in, or for some
other reason are using bash-it environment on a foreign machine.
pull/1216/head
Adam Wallis 2018-07-18 09:52:52 -04:00
parent dd081b6e5f
commit ac42a6233c
1 changed files with 2 additions and 7 deletions

View File

@ -2,13 +2,8 @@ cite about-plugin
about-plugin 'initialize jump (see https://github.com/gsamokovarov/jump)'
__init_jump() {
command -v jump &> /dev/null
if [ $? -eq 1 ]; then
echo -e "You must install jump before you can use this plugin"
echo -e "See: https://github.com/gsamokovarov/jump"
else
eval "$(jump shell --bind=z)"
fi
command -v jump &> /dev/null || return
eval "$(jump shell --bind=z)"
}
__init_jump