From c5532fea3159c8a057f97614f172868280735008 Mon Sep 17 00:00:00 2001 From: bretello Date: Thu, 14 Sep 2023 22:45:24 +0200 Subject: [PATCH] zsh: add FZF_CTRL_T_COMMAND --- brethil_dotfile.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/brethil_dotfile.sh b/brethil_dotfile.sh index 8887d94..a59b8fb 100755 --- a/brethil_dotfile.sh +++ b/brethil_dotfile.sh @@ -18,6 +18,13 @@ antibody bundle < "$DOTFILES/antibody_plugins.txt" source $DOTFILES/completion_style.zsh source $DOTFILES/extras/fzf-tab-config.zsh +if command -v fd >/dev/null; then + export FZF_CTRL_T_COMMAND='fd' +else + export FZF_CTRL_T_COMMAND='find' +fi +export FZF_CTRL_T_OPTS=" --preview-window=right,60% --preview \"bash -c 'if [[ -d \"{}\" ]]; then tree -C \"{}\"; else bat --style=plain --color=always \"{}\"; fi'\" --bind 'ctrl-/:change-preview-window(right,70%|down,40%,border-horizontal|hidden|right)'" + if [[ "$(command -v systemctl)" ]]; then antibody bundle robbyrussell/oh-my-zsh path:plugins/systemd fi