some improvements regarding ble.sh
This commit is contained in:
parent
4e1a6c265d
commit
69b53ba287
1 changed files with 33 additions and 15 deletions
48
.bashrc
48
.bashrc
|
@ -140,11 +140,35 @@ _defaults_() {
|
|||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
fi
|
||||
# Use bash-completion, if available
|
||||
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && . /usr/share/bash-completion/bash_completion
|
||||
}
|
||||
|
||||
plugins() {
|
||||
p_blesh() {
|
||||
i_blesh() {
|
||||
install gawk make &&
|
||||
git clone https://github.com/akinomyoga/ble.sh.git /tmp/blesh &&
|
||||
cd /tmp/blesh &&
|
||||
make
|
||||
make INSDIR="$HOME/.local/share/blesh" install
|
||||
}
|
||||
# ─< ble.sh -- https://github.com/akinomyoga/ble.sh >─────────────────────────────────────
|
||||
if [[ ! -e $HOME/.local/share/blesh/ble.sh ]]; then
|
||||
i_blesh
|
||||
else
|
||||
[[ $- == *i* ]] &&
|
||||
source "$HOME/.local/share/blesh/ble.sh" --attach=none
|
||||
fi
|
||||
}
|
||||
|
||||
p_basher() {
|
||||
if [[ ! -d $HOME/.basher/ ]]; then
|
||||
git clone --depth=1 https://github.com/basherpm/basher.git ~/.basher
|
||||
else
|
||||
export PATH="$HOME/.basher/bin:$PATH"
|
||||
eval "$(basher init - bash)" && silentexec $(cd $HOME/.basher/ && git pull)
|
||||
fi
|
||||
}
|
||||
|
||||
p_has() {
|
||||
if ! command_exists has; then
|
||||
$(git clone https://github.com/kdabir/has.git /tmp/has && cd /tmp/has && sudo make install)
|
||||
else
|
||||
|
@ -153,21 +177,14 @@ plugins() {
|
|||
has $pkgs
|
||||
}
|
||||
fi
|
||||
# ─< ble.sh -- https://github.com/akinomyoga/ble.sh >─────────────────────────────────────
|
||||
[[ -f $HOME/.local/share/blesh/ble.sh ]] && . $HOME/.local/share/blesh/ble.sh
|
||||
[[ ${BLE_VERSION-} ]] && ble-attach
|
||||
}
|
||||
|
||||
plugins() {
|
||||
# ─< qfc -- https://github.com/pindexis/qfc >─────────────────────────────────────────────
|
||||
# [[ -s "$HOME/.qfc/bin/qfc.sh" ]] && source "$HOME/.qfc/bin/qfc.sh"
|
||||
_basher() {
|
||||
if [[ ! -d $HOME/.basher/ ]]; then
|
||||
git clone --depth=1 https://github.com/basherpm/basher.git ~/.basher
|
||||
else
|
||||
export PATH="$HOME/.basher/bin:$PATH"
|
||||
eval "$(basher init - bash)" && silentexec $(cd $HOME/.basher/ && git pull)
|
||||
fi
|
||||
}
|
||||
_basher
|
||||
# p_basher
|
||||
p_has
|
||||
p_blesh
|
||||
}
|
||||
|
||||
_color_prompt_() {
|
||||
|
@ -588,3 +605,4 @@ main() {
|
|||
tools
|
||||
}
|
||||
main
|
||||
[[ ${BLE_VERSION-} ]] && ble-attach
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue