fzf bugfixing
This commit is contained in:
parent
edb70380ec
commit
a555be6c56
1 changed files with 7 additions and 11 deletions
18
.bashrc
18
.bashrc
|
@ -220,25 +220,21 @@ _cli_qol_() {
|
|||
}
|
||||
|
||||
_fzf_(){
|
||||
# ─< Setup fzf >──────────────────────────────────────────────────────────────────────────
|
||||
if [[ ! "$PATH" == */usr/share/doc/fzf/examples* ]]; then
|
||||
export PATH="${PATH:+${PATH}:}/usr/share/doc/fzf/examples"
|
||||
fi
|
||||
# ─< Auto-completion >────────────────────────────────────────────────────────────────────
|
||||
[[ $- == *i* ]] && source "/usr/share/doc/fzf/examples/completion.bash" 2> /dev/null
|
||||
|
||||
# ─< Key bindings >───────────────────────────────────────────────────────────────────────
|
||||
# source /usr/share/doc/fzf/examples/completion.bash
|
||||
if [ -f $HOME/.fzf.bash ]; then
|
||||
source $HOME/.fzf.bash
|
||||
if [ -f ~/.fzf.bash ]; then
|
||||
. ~/.fzf.bash
|
||||
else
|
||||
echo_error "fzf completion script not found"
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue