From 735a21cbc75c5d3ef9c232c0e07b43c273899b76 Mon Sep 17 00:00:00 2001 From: chenyc Date: Fri, 6 Jan 2023 15:52:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0fzf-tab=E9=85=8D=E7=BD=AE=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0group?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/fzf.zsh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config/fzf.zsh b/config/fzf.zsh index 090cb82..7cc68b5 100644 --- a/config/fzf.zsh +++ b/config/fzf.zsh @@ -1,13 +1,17 @@ -export FZF_DEFAULT_OPTS="--height 12 --layout=reverse --history=$OMZ/cache/fzfhistory" +# export FZF_DEFAULT_OPTS="--height 12 --layout=reverse --history=$OMZ/cache/fzfhistory" export FZF_DEFAULT_COMMAND="fd --exclude={.git,.idea,.vscode,.sass-cache,node_modules,build,dist,vendor} --type f" export FZF_PREVIEW_COMMAND='bash $OMZ/lib/file_preview.sh {}' zstyle ':completion:complete:*:options' sort false zstyle ':fzf-tab:complete:_zlua:*' query-string input +zstyle ':completion:*:descriptions' format "[%d]" +zstyle ':fzf-tab:*' group-colors $'\033[15m' $'\033[14m' $'\033[33m' $'\033[35m' $'\033[15m' $'\033[14m' $'\033[33m' $'\033[35m' +zstyle ':fzf-tab:*' prefix '' zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w" -zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-preview 'ps --pid=$word -o cmd --no-headers -w -w' +zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-preview '[ "$group" = "process ID" ] && ps --pid=$word -o cmd --no-headers -w -w' zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-flags --preview-window=down:3:wrap zstyle ':fzf-tab:complete:systemctl-*:*' fzf-preview 'SYSTEMD_COLORS=1 systemctl status $word' +zstyle ':fzf-tab:complete:(yay|pacman):*' fzf-preview 'yay -Ss $word' zstyle ':fzf-tab:complete:(\\|)run-help:*' fzf-preview 'run-help $word' zstyle ':fzf-tab:complete:(\\|*/|)man:*' fzf-preview 'man $word' zstyle ':fzf-tab:complete:git-(add|diff|restore):*' fzf-preview 'git diff --color=always $word'