From e048d023a5c8440064801f5f16a9707f4ecc30b7 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Thu, 25 Nov 2021 04:29:51 -0800 Subject: [PATCH] zsh: add ef() (edit file) --- .zshrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.zshrc b/.zshrc index 8b30892..84134b9 100644 --- a/.zshrc +++ b/.zshrc @@ -224,6 +224,12 @@ done } + # edit file: Uses fzy to locate a file, and opens it in your favorite text editor + # Takes arguments for `fd` + ef() { + "$EDITOR" "$(fd $@ | fzy)" + } + # toggles whether a file or group of files is executable chx() { for FILE in "$@";do