From a02bd9d73c1481c1f2ab6882f048c5d6d7fefdf1 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Mon, 16 Sep 2024 01:08:06 -0400 Subject: [PATCH] global/*: add better fzf args --- modules/global/shell.nix | 4 ++-- users/modules/global/git.nix | 8 ++++---- users/modules/global/shells/zsh.nix | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/global/shell.nix b/modules/global/shell.nix index fe5e266..166ba63 100644 --- a/modules/global/shell.nix +++ b/modules/global/shell.nix @@ -96,9 +96,9 @@ in universe.packages = [ (pkgs.writeScriptBin "editi" '' if [[ $# -eq 0 ]] then - $EDITOR "$(fd -H -t f | fzf)" + $EDITOR "$(fd -H -t f | fzf --filepath-word --multi)" else - $EDITOR "$(fd -H -t f | fzf -1 -q "$*")" + $EDITOR "$(fd -H -t f | fzf --filepath-word --multi -1 -q "$*")" fi '') ]; diff --git a/users/modules/global/git.nix b/users/modules/global/git.nix index e2002bb..4e09366 100644 --- a/users/modules/global/git.nix +++ b/users/modules/global/git.nix @@ -9,9 +9,9 @@ echo "Not in a git repository" exit 1 elif [[ $# -eq 0 ]] then - echo "$(git ls-files | fzf)" + echo "$(git ls-files | fzf --filepath-word --multi)" else - echo "$(git ls-files | fzf -1 -q "$*")" + echo "$(git ls-files | fzf --filepath-word --multi -1 -q "$*")" fi '') (writeScriptBin "git-fzf-edit" '' @@ -20,9 +20,9 @@ echo "Not in a git repository" exit 1 elif [[ $# -eq 0 ]] then - $EDITOR "$(git ls-files | fzf)" + $EDITOR "$(git ls-files | fzf --filepath-word --multi)" else - $EDITOR "$(git ls-files | fzf -1 -q "$*")" + $EDITOR "$(git ls-files | fzf --filepath-word --multi -1 -q "$*")" fi '') ]; diff --git a/users/modules/global/shells/zsh.nix b/users/modules/global/shells/zsh.nix index 5d2e6fa..5b49cd2 100644 --- a/users/modules/global/shells/zsh.nix +++ b/users/modules/global/shells/zsh.nix @@ -40,9 +40,9 @@ j() { if [[ $# -eq 0 ]] then - \builtin cd -- "$(fd -H -t d | fzf)" + \builtin cd -- "$(fd -H -t d | fzf --filepath-word)" else - \builtin cd -- "$(fd -H -t d | fzf -1 -q "$*")" + \builtin cd -- "$(fd -H -t d | fzf --filepath-word -1 -q "$*")" fi }