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
|
if [ -f ~/.bash_aliases ]; then
|
||||||
. ~/.bash_aliases
|
. ~/.bash_aliases
|
||||||
fi
|
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
|
if ! command_exists has; then
|
||||||
$(git clone https://github.com/kdabir/has.git /tmp/has && cd /tmp/has && sudo make install)
|
$(git clone https://github.com/kdabir/has.git /tmp/has && cd /tmp/has && sudo make install)
|
||||||
else
|
else
|
||||||
|
@ -153,21 +177,14 @@ plugins() {
|
||||||
has $pkgs
|
has $pkgs
|
||||||
}
|
}
|
||||||
fi
|
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 >─────────────────────────────────────────────
|
# ─< qfc -- https://github.com/pindexis/qfc >─────────────────────────────────────────────
|
||||||
# [[ -s "$HOME/.qfc/bin/qfc.sh" ]] && source "$HOME/.qfc/bin/qfc.sh"
|
# [[ -s "$HOME/.qfc/bin/qfc.sh" ]] && source "$HOME/.qfc/bin/qfc.sh"
|
||||||
_basher() {
|
# p_basher
|
||||||
if [[ ! -d $HOME/.basher/ ]]; then
|
p_has
|
||||||
git clone --depth=1 https://github.com/basherpm/basher.git ~/.basher
|
p_blesh
|
||||||
else
|
|
||||||
export PATH="$HOME/.basher/bin:$PATH"
|
|
||||||
eval "$(basher init - bash)" && silentexec $(cd $HOME/.basher/ && git pull)
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
_basher
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_color_prompt_() {
|
_color_prompt_() {
|
||||||
|
@ -588,3 +605,4 @@ main() {
|
||||||
tools
|
tools
|
||||||
}
|
}
|
||||||
main
|
main
|
||||||
|
[[ ${BLE_VERSION-} ]] && ble-attach
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue