From 9d13948f50f4632a8eaedd0ace46a5f801fec0e9 Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Thu, 25 Apr 2024 09:19:34 -0700 Subject: [PATCH] recent with fzf tweak --- git-recent-with-fzf-and-diff | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/git-recent-with-fzf-and-diff b/git-recent-with-fzf-and-diff index b0c184d..b2441f4 100755 --- a/git-recent-with-fzf-and-diff +++ b/git-recent-with-fzf-and-diff @@ -2,6 +2,12 @@ #!/bin/bash # git recent but with a FZF preview of the branch diff. +# run this somewhere: +# bind \cb git-recent-with-fzf-and-diff +# then do +# git checkout CTRL-B + + branches_format="%(color:yellow)%(refname:short)%(color:reset)" commits_format="%C(red bold)%h %C(bold blue)%an %C(bold green)%ad %Creset%s" @@ -25,6 +31,3 @@ git for-each-ref --color=always --sort=-committerdate "refs/heads/" --format="$ --header $'CTRL-O (branch diff)\n\n' \ --bind "ctrl-o:execute:$diffbranch_cmd" -# Checkout the selected item -# git checkout (echo $target | awk '{print $2}') - \ No newline at end of file