More fzf magic.

This commit is contained in:
Bartek Stalewski 2020-10-25 21:37:12 +01:00
parent f78902334e
commit 5a13d16edd

View file

@ -21,14 +21,18 @@ if [ -f $XDG_CONFIG_HOME/fzf/fzf.zsh ]; then
export FZF_TMUX_HEIGHT=60%
export FZF_DEFAULT_COMMAND='fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd'
export FZF_CTRL_T_COMMAND='fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd'
export FZF_DEFAULT_OPTS="-e --multi --layout=reverse --preview='bat --color=always --tabs=2 --style=plain --theme=gruvbox {}'"
export FZF_CTRL_R_OPTS="-e --layout=reverse --preview=''"
export FZF_DEFAULT_OPTS="--multi -e --ansi --layout=reverse --preview='bat --color=always --tabs=2 --style=plain --theme=gruvbox {}'"
export FZF_CTRL_R_OPTS="-e --ansi --layout=reverse --preview=''"
_fzf_compgen_path() {
fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd . "$1"
}
_fzf_compgen_dir() {
fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd --type d . "$1"
}
gs() {
git -c color.status=always status --short |
fzf --ansi --preview '(git diff --color=always -- {-1} | sed 1,4d; cat {-1})'
}
else
zstyle ':completion:*' menu select
zstyle ':completion:*' list-colors ''