From 2d0ebc52aac14d4c2a37a14b5840ffbe231967a0 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Sat, 13 Sep 2025 17:00:05 -0400 Subject: [PATCH] global/shell: change fzf edit scripts to close with no results --- modules/global/shell.nix | 4 ++-- users/modules/global/git.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/global/shell.nix b/modules/global/shell.nix index 676d03b..208a2b1 100644 --- a/modules/global/shell.nix +++ b/modules/global/shell.nix @@ -103,9 +103,9 @@ in universe.packages = [ (pkgs.writeScriptBin "editi" '' if [[ $# -eq 0 ]] then - fd -H -t f | fzf --filepath-word --multi | xargs $EDITOR + fd -H -t f | fzf --filepath-word --multi | xargs -r $EDITOR else - fd -H -t f | fzf --filepath-word --multi -1 -q "$*" | xargs $EDITOR + fd -H -t f | fzf --filepath-word --multi -1 -q "$*" | xargs -r $EDITOR fi '') ]; diff --git a/users/modules/global/git.nix b/users/modules/global/git.nix index d770f98..df528a1 100644 --- a/users/modules/global/git.nix +++ b/users/modules/global/git.nix @@ -22,9 +22,9 @@ echo "Not in a git repository" exit 1 elif [[ $# -eq 0 ]] then - git ls-files | fzf --filepath-word --multi | xargs $EDITOR + git ls-files | fzf --filepath-word --multi | xargs -r $EDITOR else - git ls-files | fzf --filepath-word --multi -1 -q "$*" | xargs $EDITOR + git ls-files | fzf --filepath-word --multi -1 -q "$*" | xargs -r $EDITOR fi '') ];