Skip to content

Commit

Permalink
plugins/jump: use _command_exists
Browse files Browse the repository at this point in the history
Addresses Bash-it#1632
  • Loading branch information
gaelicWizard committed Sep 10, 2021
1 parent 27233a7 commit 96bbafc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugins/available/jump.plugin.bash
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# shellcheck shell=bash
cite about-plugin
about-plugin 'initialize jump (see https://github.com/gsamokovarov/jump). Add `export JUMP_OPTS=("--bind=z")` to change keybinding'

__init_jump() {
command -v jump &> /dev/null || return
eval "$(jump shell bash "${JUMP_OPTS[@]}")"
function __init_jump()
{
_command_exists jump && eval "$(jump shell bash "${JUMP_OPTS[@]}")"
}

__init_jump

0 comments on commit 96bbafc

Please sign in to comment.