some changes
This commit is contained in:
parent
59e14c3577
commit
58205a50b9
1 changed files with 2 additions and 29 deletions
31
.bashrc
31
.bashrc
|
@ -217,33 +217,7 @@ _cli_qol_() {
|
||||||
curl -s https://ohmyposh.dev/install.sh | sudo bash -s -- -d /usr/bin/
|
curl -s https://ohmyposh.dev/install.sh | sudo bash -s -- -d /usr/bin/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
[[ -f $HOME/.src/ble.sh ]] && . $HOME/.src/ble.sh
|
||||||
|
|
||||||
_fzf_(){
|
|
||||||
# source /usr/share/doc/fzf/examples/completion.bash
|
|
||||||
if [ -f ~/.fzf.bash ]; then
|
|
||||||
. ~/.fzf.bash
|
|
||||||
else
|
|
||||||
echo_error "fzf completion script not found in ~/.fzf.bash"
|
|
||||||
fi
|
|
||||||
if [ -f /etc/bash_completion ]; then
|
|
||||||
. /etc/bash_completion
|
|
||||||
fi
|
|
||||||
source /usr/share/doc/fzf/examples/key-bindings.bash
|
|
||||||
# ─< Use fzf for completion >─────────────────────────────────────────────────────────────
|
|
||||||
bind -x '"\t": fzf-completion'
|
|
||||||
bind -x '"\C-i": fzf-completion'
|
|
||||||
}
|
|
||||||
|
|
||||||
_fzf_comprun() {
|
|
||||||
local command=$1
|
|
||||||
shift
|
|
||||||
case "$command" in
|
|
||||||
cd) fzf --preview 'tree -C {} | head -200' "$@" ;;
|
|
||||||
export|unset) fzf --preview "eval 'echo \$'{}" "$@" ;;
|
|
||||||
ssh) fzf --preview 'dig {}' "$@" ;;
|
|
||||||
*) fzf --preview 'bat -n --color=always {}' "$@" ;;
|
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# ─< t stands for trash(-cli) >───────────────────────────────────────────────────────────────
|
# ─< t stands for trash(-cli) >───────────────────────────────────────────────────────────────
|
||||||
|
@ -480,7 +454,6 @@ get_alias() {
|
||||||
_defaults_
|
_defaults_
|
||||||
_color_prompt_
|
_color_prompt_
|
||||||
_cli_qol_
|
_cli_qol_
|
||||||
_fzf_
|
|
||||||
_cat_
|
_cat_
|
||||||
_trash
|
_trash
|
||||||
_nmap_
|
_nmap_
|
||||||
|
@ -499,5 +472,5 @@ main() {
|
||||||
get_packager
|
get_packager
|
||||||
get_alias
|
get_alias
|
||||||
}
|
}
|
||||||
|
|
||||||
main
|
main
|
||||||
|
[[ ${BLE_VERSION-} ]] && ble-attach
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue