From c360f0c7c5c30dfbd0f19e451bb101cfac4196a5 Mon Sep 17 00:00:00 2001 From: Noah Gorny Date: Fri, 21 May 2021 17:47:44 +0300 Subject: [PATCH] plugins: Add ble.sh plugin --- clean_files.txt | 1 + plugins/available/blesh.plugin.bash | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 plugins/available/blesh.plugin.bash diff --git a/clean_files.txt b/clean_files.txt index 420c6cc9..da7e41bc 100644 --- a/clean_files.txt +++ b/clean_files.txt @@ -84,6 +84,7 @@ plugins/available/alias-completion.plugin.bash plugins/available/autojump.plugin.bash plugins/available/base.plugin.bash plugins/available/basher.plugin.bash +plugins/available/blesh.plugin.bash plugins/available/cmd-returned-notify.plugin.bash plugins/available/direnv.plugin.bash plugins/available/docker-machine.plugin.bash diff --git a/plugins/available/blesh.plugin.bash b/plugins/available/blesh.plugin.bash new file mode 100644 index 00000000..7b1ce74e --- /dev/null +++ b/plugins/available/blesh.plugin.bash @@ -0,0 +1,19 @@ +# shellcheck shell=bash +cite about-plugin +about-plugin 'load ble.sh, the Bash line editor!' + +if [[ ${BLE_VERSION-} ]]; then + _log_warning "ble.sh is already loaded!" + return +fi + +_bash_it_ble_path=${XDG_DATA_HOME:-$HOME/.local/share}/blesh/ble.sh +if [[ -f $_bash_it_ble_path ]]; then + # shellcheck disable=1090 + source "$_bash_it_ble_path" +else + _log_error "Could not find ble.sh in $_bash_it_ble_path" + _log_error "Please install using the following command:" + _log_error "git clone https://github.com/akinomyoga/ble.sh && make -C ble.sh install" +fi +unset _bash_it_ble_path