From df0ef42f7292bb8c74234b45412993d0007872b9 Mon Sep 17 00:00:00 2001 From: Daniel Lynn Date: Mon, 11 Apr 2022 17:04:26 -0500 Subject: [PATCH] Add e? func for quickly searching and opening files --- zshrc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 5710435..3b9a154 100644 --- a/zshrc +++ b/zshrc @@ -55,8 +55,15 @@ if (( $+commands[direnv])); then eval "$(direnv hook zsh)" fi +# Use fzf +if (( $+commands[fzf] )); then + e?() { + $EDITOR $(fzf) + } +fi + # Use fd for fzf -if (( $+commands[fd] )); then +if (( $+commands[fd] && $+commands[fzf] )); then _fzf_compgen_path() { fd --hidden --follow --exclude ".git" . "$1" }