Aloxaf / fzf-tab

Replace zsh's default completion selection menu with fzf!
MIT License
3.28k stars 94 forks source link

[Q] How can I get a preview of my alias's? #347

Closed ms-bis closed 1 year ago

ms-bis commented 1 year ago

How to get the preview of aliased commands? like the command, type -a ls output: ls is an alias for exa --icons --color=always --group-directories-first ls is /usr/bin/ls ls is /bin/ls

Aloxaf commented 1 year ago

There is no good way to achieve this. The preview code runs in a separate shell, and it doesn't know your zsh config.

I suggest you put your alias setting in a separate file, and source it in preview shell. zstyle ':fzf-tab:complete:type:*' fzf-preview 'source pathtomyzshalias; whence -av $word'