From 31d12e43445e32a5f9d0f612ae837cf1445a2503 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Thu, 2 May 2019 01:48:11 -0400 Subject: [PATCH] Added preview functions for fzf. --- zsh/zshenv | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zsh/zshenv b/zsh/zshenv index 1e83051..6085844 100644 --- a/zsh/zshenv +++ b/zsh/zshenv @@ -56,6 +56,11 @@ zstyle ':tmux:auto-start' name 'tmux' # FZF tmux properties. FZF_TMUX=1 FZF_TMUX_HEIGHT=30% +# Add fzf functions +export FZF_CTRL_T_OPTS="--preview \" (( $+commands[bat] )) \ + && bat --color=always --line-range :500 {} \ + || cat {} \"" +export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -100'" # Auto suggestion config ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=7"