From 9a8180e2756b4d697f25ed1db7ab5993a1ac08ea Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Wed, 6 Mar 2024 22:59:02 -0500 Subject: [PATCH] shells/zsh: add editi function --- users/modules/global/shells/zsh.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/users/modules/global/shells/zsh.nix b/users/modules/global/shells/zsh.nix index 42161b2..f19768d 100644 --- a/users/modules/global/shells/zsh.nix +++ b/users/modules/global/shells/zsh.nix @@ -47,6 +47,14 @@ } alias "jh"="cd ~ && j" + + editi() { + if [[ $# -eq 0 ]] then + edit "$(fd -H -t f | fzf)" + else + edit "$(fd -H -t f | fzf -1 -q "$*")" + fi + } ''; dotDir = ".config/zsh";