Add fzf config
This commit is contained in:
parent
f2294ab3f0
commit
5290b2291c
20
bash/fzf
Normal file
20
bash/fzf
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# Setup fzf
|
||||||
|
# ---------
|
||||||
|
if [[ ! "$PATH" == */usr/local/opt/fzf/bin* ]]; then
|
||||||
|
export PATH="$PATH:/usr/local/opt/fzf/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Man path
|
||||||
|
# --------
|
||||||
|
if [[ ! "$MANPATH" == */usr/local/opt/fzf/man* && -d "/usr/local/opt/fzf/man" ]]; then
|
||||||
|
export MANPATH="$MANPATH:/usr/local/opt/fzf/man"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Auto-completion
|
||||||
|
# ---------------
|
||||||
|
[[ $- == *i* ]] && source "/usr/local/opt/fzf/shell/completion.bash" 2> /dev/null
|
||||||
|
|
||||||
|
# Key bindings
|
||||||
|
# ------------
|
||||||
|
source "/usr/local/opt/fzf/shell/key-bindings.bash"
|
||||||
|
|
16
zsh/fzf
Normal file
16
zsh/fzf
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
local fzf_path="/usr/local/opt/fzf"
|
||||||
|
|
||||||
|
export FZF_DEFAULT_COMMAND='ag -g ""'
|
||||||
|
export FZF_DEFAULT_OPTS='--reverse --inline-info'
|
||||||
|
|
||||||
|
if [[ ! "$PATH" == *$fzf_path/bin* ]]; then
|
||||||
|
export PATH="$PATH:$fzf_path/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! "$MANPATH" == *$fzf_path/man* && -d "$fzf_path/man" ]]; then
|
||||||
|
export MANPATH="$MANPATH:$fzf_path/man"
|
||||||
|
fi
|
||||||
|
|
||||||
|
is-interactive && source "$fzf_path/shell/completion.zsh" 2> /dev/null
|
||||||
|
|
||||||
|
source "$fzf_path/shell/key-bindings.zsh"
|
11
zshrc
11
zshrc
|
@ -19,22 +19,17 @@ if ! zgen saved; then
|
||||||
|
|
||||||
zgen load hlissner/zsh-autopair "autopair.zsh"
|
zgen load hlissner/zsh-autopair "autopair.zsh"
|
||||||
zgen load zsh-users/zsh-history-substring-search
|
zgen load zsh-users/zsh-history-substring-search
|
||||||
is-ssh || zgen load zsh-users/zsh-syntax-highlighting
|
|
||||||
zgen load zsh-users/zsh-completions src
|
zgen load zsh-users/zsh-completions src
|
||||||
|
is-ssh || zgen load zsh-users/zsh-syntax-highlighting
|
||||||
|
|
||||||
zgen save
|
zgen save
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cache rbenv init - --no-rehash
|
cache rbenv init - --no-rehash
|
||||||
cache pyenv init - --no-rehash
|
cache pyenv init - --no-rehash
|
||||||
if is-interactive; then
|
is-interactive && cache fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install
|
||||||
cache fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install
|
|
||||||
|
|
||||||
export FZF_DEFAULT_COMMAND='ag -g ""'
|
|
||||||
export FZF_DEFAULT_OPTS='--reverse --inline-info'
|
|
||||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
iload zsh/fzf
|
||||||
load zsh/config
|
load zsh/config
|
||||||
iload zsh/keybinds
|
iload zsh/keybinds
|
||||||
iload zsh/prompt
|
iload zsh/prompt
|
||||||
|
|
Loading…
Reference in a new issue