From ac2a761faea28dc3f75e4e1bfb553abf18176e01 Mon Sep 17 00:00:00 2001 From: Daniel Carrillo Date: Sat, 9 Apr 2022 18:14:39 +0200 Subject: [PATCH] [zprezto] Add fzf-tab --- .zpreztorc | 16 +++++++++++++++- .zshrc | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.zpreztorc b/.zpreztorc index a628459..2f7e32d 100644 --- a/.zpreztorc +++ b/.zpreztorc @@ -36,7 +36,8 @@ zstyle ':prezto:load' pmodule \ 'syntax-highlighting' \ 'python' \ 'git' \ - 'aws' + 'aws' \ + 'fzf-tab' # # Autosuggestions @@ -197,3 +198,16 @@ zstyle ':prezto:module:terminal:tab-title' format '%m: %s' zstyle ':prezto:module:aws' output 'table' zstyle ':prezto:module:aws' profile 'default' zstyle ':prezto:module:aws' show_region 'true' + +# +# fzf-tab +# + +# disable sort when completing `git checkout` +zstyle ':completion:*:git-checkout:*' sort false +# set descriptions format to enable group support +zstyle ':completion:*:descriptions' format '[%d]' +# set list-colors to enable filename colorizing +zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} +# switch group using `,` and `.` +zstyle ':fzf-tab:*' switch-group ',' '.' diff --git a/.zshrc b/.zshrc index 921be41..026473f 100644 --- a/.zshrc +++ b/.zshrc @@ -101,6 +101,8 @@ kexec () { [ -n "$cid" ] && kubectl exec -ti "$cid" -- "${cmd[@]}" } +## fzf + export FZF_DEFAULT_COMMAND="fd --type f --follow -I" export FZF_DEFAULT_OPTS="-m --reverse \ --color 'info:#00AAFF,prompt:#FFFFFF,pointer:#00AAFF,hl:#1AE51A,hl+:#1AE51A' \