From c7cdb7144467ee6d6c61e6725ec3d42199967fb7 Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Thu, 5 Sep 2024 11:21:41 -0700 Subject: [PATCH] zsh: Configure fzf hook --- zsh/.zshrc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 2c2ce6d..7ef7406 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -85,7 +85,14 @@ source $HOME/.config/zsh/j.sh autoload -U select-word-style select-word-style bash -which direnv > /dev/null && eval "$(direnv hook zsh)" || true +_has() { + command -V "$1" > /dev/null 2> /dev/null +} + +_has direnv && eval "$(direnv hook zsh)" || true + +FZF_CTRL_T_COMMAND='' +_has fzf && eval "$(fzf --zsh)" || true setopt interactivecomments