fix fzf
This commit is contained in:
parent
c03dbc65bc
commit
f6299e11e4
4 changed files with 7 additions and 29 deletions
|
@ -45,12 +45,8 @@ if [[ $iatest > 0 ]]; then bind "set completion-ignore-case on"; fi
|
|||
if [[ $iatest > 0 ]]; then bind "set show-all-if-ambiguous On"; fi
|
||||
|
||||
# Set the default editor
|
||||
export EDITOR=nano
|
||||
export VISUAL=nano
|
||||
alias pico='edit'
|
||||
alias spico='sedit'
|
||||
alias nano='edit'
|
||||
alias snano='sedit'
|
||||
export EDITOR=vi
|
||||
export VISUAL=vi
|
||||
|
||||
# To have colors for ls and all grep commands such as grep, egrep and zgrep
|
||||
export CLICOLOR=1
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
export FZF_DEFAULT_COMMAND=ag
|
||||
|
||||
export FZF_COMPLETION_TRIGGER='**'
|
||||
export FZF_DEFAULT_COMMAND=fd
|
||||
|
||||
# Options to fzf command
|
||||
export FZF_COMPLETION_OPTS='--border --info=inline'
|
||||
|
@ -10,7 +8,7 @@ export FZF_COMPLETION_OPTS='--border --info=inline'
|
|||
# - The first argument to the function ($1) is the base path to start traversal
|
||||
# - See the source code (completion.{bash,zsh}) for the details.
|
||||
_fzf_compgen_path() {
|
||||
fdfind --hidden --follow --exclude ".git" . "$1"
|
||||
fdfind --type file --hidden --follow --exclude ".git" . "$1"
|
||||
}
|
||||
|
||||
# Use fd to generate the list for directory completion
|
||||
|
@ -33,16 +31,5 @@ _fzf_comprun() {
|
|||
esac
|
||||
}
|
||||
|
||||
# Setup fzf
|
||||
# ---------
|
||||
if [[ ! "$PATH" == *~/repos/fzf/bin* ]]; then
|
||||
PATH="${PATH:+${PATH}:}~/repos/fzf/bin"
|
||||
fi
|
||||
|
||||
# Auto-completion
|
||||
# ---------------
|
||||
[[ $- == *i* ]] && source "~/repos/fzf/shell/completion.bash" 2> /dev/null
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
source "~/repos/fzf/shell/key-bindings.bash"
|
||||
source /usr/share/doc/fzf/examples/key-bindings.bash
|
||||
source /usr/share/bash-completion/completions/fzf
|
||||
|
|
Reference in a new issue