diff --git a/.zshrc b/.zshrc index d78262a..a857711 100644 --- a/.zshrc +++ b/.zshrc @@ -53,6 +53,15 @@ _fzf_compgen_path() { _fzf_compgen_dir() { fdfind --type d --hidden --exclude .git --exclude __pycache__ --exclude node_modules --exclude .cache . "$1" } +_fzf_comprun() { + local command=$1 + shift + + case "$command" in + ssh) fzf --preview 'ssh -tt -G {} | head -n 4' "$@" ;; + *) fzf "$@" ;; + esac +} source /usr/share/doc/fzf/examples/completion.zsh source /usr/share/doc/fzf/examples/key-bindings.zsh