zsh: Fix fzf-tab to make use of refactored options

Use new option structure for fzf-tab, see fzf-tab wiki for more
information.
This commit is contained in:
Marty Oehme 2022-07-08 23:54:39 +02:00
parent aad5d67aab
commit 13ec6ed600
Signed by: Marty
GPG key ID: B7538B8F50A1C800

View file

@ -31,21 +31,12 @@ source /usr/share/fzf/key-bindings.zsh
unset PLUG_FOLDER unset PLUG_FOLDER
# simple fzf-tab settings # simple fzf-tab settings
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"
fzf
--ansi # Enable ANSI color support, necessary for showing groups zstyle ':fzf-tab:*' fzf-command fzf
--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
# format colorful groups for different completion actions # format colorful groups for different completion actions
zstyle ':completion:*:descriptions' format '[%d]' zstyle ':completion:*:descriptions' format '[%d]'
zstyle ':fzf-tab:*' show-group brief
# use input as query string when completing zlua # use input as query string when completing zlua
zstyle ':fzf-tab:complete:_zlua:*' query-string input zstyle ':fzf-tab:complete:_zlua:*' query-string input
# (experimental, may change in the future) # (experimental, may change in the future)