diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 7e0069e..33f237d 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -38,12 +38,13 @@ zstyle ':completion:*:descriptions' format '[%d]' zstyle ':fzf-tab:*' show-group none zstyle ':fzf-tab:*' prefix '' +# Use C-x h to get possible contexts for a command zstyle ':fzf-tab:complete:(ls|rmdir|grep):argument-rest' fzf-preview 'ls -1 --color=always $realpath' zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls -1 --color=always $realpath' zstyle ':fzf-tab:complete:rg:operand-argument-rest' fzf-preview 'ls -1 --color=always $realpath' zstyle ':fzf-tab:complete:(less|cat):argument-rest' fzf-preview 'less $realpath' zstyle ':fzf-tab:complete:emacsclient:*' fzf-preview 'less $realpath' -zstyle ':fzf-tab:complete:(lessp|evince|mpv):*argument-rest' fzf-preview 'LESSOPEN="|lesspipe %s" less $realpath' +zstyle ':fzf-tab:complete:(lessp|evince|mpv|cp|mv):*argument-rest' fzf-preview 'LESSOPEN="|lesspipe %s" less $realpath' zstyle ':fzf-tab:complete:file:*' fzf-preview 'file --brief $realpath' zstyle ':fzf-tab:complete:git-log:argument-1' fzf-preview 'git log --color=always $word' zstyle ':fzf-tab:complete:git-show:argument-rest' fzf-preview 'git show --color=always $word'