Add e? func for quickly searching and opening files

This commit is contained in:
2022-04-11 17:04:26 -05:00
parent b5a86e4b0c
commit df0ef42f72

9
zshrc
View File

@ -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"
}