global/shell: change fzf edit scripts to close with no results

This commit is contained in:
Infinidoge 2025-09-13 17:00:05 -04:00
parent d095e4692d
commit 2d0ebc52aa
Signed by: Infinidoge
SSH key fingerprint: SHA256:oAMyvotlNFraMmZmr+p6AxnNfW/GioTs1pOn3V4tQ7A
2 changed files with 4 additions and 4 deletions

View file

@ -103,9 +103,9 @@ in
universe.packages = [ universe.packages = [
(pkgs.writeScriptBin "editi" '' (pkgs.writeScriptBin "editi" ''
if [[ $# -eq 0 ]] then 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 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 fi
'') '')
]; ];

View file

@ -22,9 +22,9 @@
echo "Not in a git repository" echo "Not in a git repository"
exit 1 exit 1
elif [[ $# -eq 0 ]] then elif [[ $# -eq 0 ]] then
git ls-files | fzf --filepath-word --multi | xargs $EDITOR git ls-files | fzf --filepath-word --multi | xargs -r $EDITOR
else 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 fi
'') '')
]; ];