From a7955b972c2f45e044de925629fb02d89e11593b Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sun, 19 Sep 2021 21:53:59 -0700 Subject: [PATCH] plugins/powerline: use `_command_exists` Addresses bash-it/bash-it#1632 --- plugins/available/powerline.plugin.bash | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/available/powerline.plugin.bash b/plugins/available/powerline.plugin.bash index 3d91e658..1927bf3e 100644 --- a/plugins/available/powerline.plugin.bash +++ b/plugins/available/powerline.plugin.bash @@ -1,9 +1,9 @@ -#!/usr/bin/env bash +# shellcheck shell=bash cite about-plugin about-plugin 'enables powerline daemon' -command -v powerline-daemon &>/dev/null || return +_command_exists powerline-daemon || return powerline-daemon -q #the following should not be executed if bashit powerline themes in use @@ -14,13 +14,13 @@ case "$BASH_IT_THEME" in esac POWERLINE_BASH_CONTINUATION=1 POWERLINE_BASH_SELECT=1 -bashPowerlineInit=$(python -c \ +bashPowerlineInit="$(python -c \ "import os; \ import powerline;\ print(os.path.join(os.path.dirname(\ powerline.__file__),\ 'bindings', \ 'bash', \ - 'powerline.sh'))") + 'powerline.sh'))")" [ -e $bashPowerlineInit ] || return -. $bashPowerlineInit +source $bashPowerlineInit