Skip to content

Commit

Permalink
plugins: Add ble.sh plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah Gorny committed Sep 28, 2021
1 parent 3eed0f0 commit 05f0672
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions clean_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions plugins/available/blesh.plugin.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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

ble_path=${XDG_DATA_HOME:-$HOME/.local/share}/blesh/ble.shsdf
if [[ -f $ble_path ]]; then
# shellcheck disable=1090
source "$ble_path"
else
_log_error "Could not find ble.sh in $ble_path"
_log_error "Please follow installation instructions from https://github.com/akinomyoga/ble.sh"
fi

0 comments on commit 05f0672

Please sign in to comment.