Copied command_exists function to the helpers lib so that there is no hidden dependency on the base plugin

The original command_exists function will stay in the base plugin, but will no longer be used by other plugins or themes.
This commit is contained in:
Nils Winkler
2017-09-15 08:10:17 +02:00
parent 0fe2710c61
commit 145ec5dfaa
10 changed files with 60 additions and 28 deletions

View File

@@ -474,7 +474,7 @@ function battery_char {
fi
}
if ! command_exists battery_charge ; then
if ! _command_exists battery_charge ; then
# if user has installed battery plugin, skip this...
function battery_charge (){
# no op
@@ -484,7 +484,7 @@ fi
# The battery_char function depends on the presence of the battery_percentage function.
# If battery_percentage is not defined, then define battery_char as a no-op.
if ! command_exists battery_percentage ; then
if ! _command_exists battery_percentage ; then
function battery_char (){
# no op
echo -n