From 13ec6ed6003fcea66abf490f7bae4f1f4f39dc13 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 8 Jul 2022 23:54:39 +0200 Subject: [PATCH] zsh: Fix fzf-tab to make use of refactored options Use new option structure for fzf-tab, see fzf-tab wiki for more information. --- zsh/.config/zsh/.zshrc | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index f090c0b..efd8c82 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -31,21 +31,12 @@ source /usr/share/fzf/key-bindings.zsh unset PLUG_FOLDER # simple fzf-tab settings -FZF_TAB_COMMAND=( - fzf - --ansi # Enable ANSI color support, necessary for showing groups - --expect='$continuous_trigger,$print_query' # For continuous completion and print query - '--color=hl:$(( $#headers == 0 ? 108 : 255 ))' - --nth=2,3 --delimiter='\x00' # Don't search prefix - --layout=reverse --height='${FZF_TMUX_HEIGHT:=75%}' - --tiebreak=begin -m --bind=tab:down,btab:up,change:top,ctrl-space:toggle --cycle - '--query=$query' # $query will be expanded to query string at runtime. - '--header-lines=$#headers' # $#headers will be expanded to lines of headers at runtime - --print-query -) -zstyle ':fzf-tab:*' command $FZF_TAB_COMMAND +zstyle ":fzf-tab:*" fzf-flags "--ansi" "--expect='$continuous_trigger,$print_query'" "--color=hl:$(($#headers == 0 ? 108 : 255))" "--nth=2,3" "--layout=reverse" "--height=${FZF_TMUX_HEIGHT:-75%}" "--tiebreak=begin" "-m" "--bind=tab:down,btab:up,change:top,ctrl-space:toggle" "--cycle" "--query=$query" "--header-lines=$#headers" "--print-query" + +zstyle ':fzf-tab:*' fzf-command fzf # format colorful groups for different completion actions zstyle ':completion:*:descriptions' format '[%d]' +zstyle ':fzf-tab:*' show-group brief # use input as query string when completing zlua zstyle ':fzf-tab:complete:_zlua:*' query-string input # (experimental, may change in the future)