Zsh: Preview arguments of cp and mv

This commit is contained in:
tastytea 2022-03-22 22:30:11 +01:00
parent 377c9937ac
commit 800d6e4f94
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM

View File

@ -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'