Merge pull request #1884 from NoahGorny/add-blesh-plugin
plugins: Add ble.sh plugin
This commit is contained in:
19
plugins/available/blesh.plugin.bash
Normal file
19
plugins/available/blesh.plugin.bash
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user