summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
Diffstat (limited to 'home')
-rw-r--r--home/home-minimal.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/home/home-minimal.nix b/home/home-minimal.nix
index c265218..d6488a5 100644
--- a/home/home-minimal.nix
+++ b/home/home-minimal.nix
@@ -70,6 +70,15 @@
end
fd $pattern | fzf --preview="glow {} --style=dark" --bind ctrl-j:preview-down,ctrl-k:preview-up,ctrl-alt-j:preview-page-down,ctrl-alt-k:preview-page-up
'';
+ git-where.body = ''
+ set gits (fd "^\\.git\$" -H)
+ for git in $gits
+ # .git may be a file (e.g. in case of standalone worktrees)
+ if test -d $git && contains origin (git --git-dir $git remote)
+ echo (git -C $git -C .. rev-parse --show-toplevel) (git --git-dir $git remote get-url origin)
+ end
+ end | fzf --preview 'git -C {1} show --no-show-signature --color=always' | cut -f1 -d" "
+ '';
};
};
@@ -93,6 +102,7 @@
log.showSignature = true;
init.defaultBranch = "main";
alias.search = "!git log --format='tformat:%h %cs %s' --no-show-signature | fzf --multi --preview 'git show {+1}|bat -p -lpatch --color=always' | cut -f1 -d\" \" | wl-copy -n && wl-paste";
+ alias.where = "!fish -c git-where";
merge.conflictStyle = "zdiff3";
push.autoSetupRemote = true;
commit.verbose = true;