Skip to content

Commit

Permalink
Merge pull request #1884 from NoahGorny/add-blesh-plugin
Browse files Browse the repository at this point in the history
plugins: Add ble.sh plugin
  • Loading branch information
NoahGorny authored Oct 6, 2021
2 parents 07384bc + c360f0c commit c3382c7
Show file tree
Hide file tree
Showing 2 changed files with 20 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
19 changes: 19 additions & 0 deletions plugins/available/blesh.plugin.bash
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c3382c7

Please sign in to comment.