summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/fzfez9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/fzfez b/bin/fzfez
index 4db1516..0e8db62 100755
--- a/bin/fzfez
+++ b/bin/fzfez
@@ -83,14 +83,15 @@ _batpreview) # highlights the line matching the query, usage: _batpreview FILENA
 git-branches)
 	git rev-parse HEAD >/dev/null 2>&1 || exit 1
 	git branch -a --format='%(refname)' |
-		cut -d' ' -f1 |
+		grep -v 'remote' |
+		cut -d'/' -f3 |
 		sort |
-		env FZFEZ_HEADER='BRANCHES: c-o (checkout)' \
+		env FZFEZ_HEADER='BRANCHES: c-o (switch)' \
 			$0 \
 			--ansi --no-sort --tac \
-			--preview 'git log --color=always --oneline --graph --date=short {} | head -${LINES}' \
+			--preview 'git log --color=always --oneline --graph --date=short ..{} && echo && git diff --color=always --stat {}' \
 			--preview-window "${windowstyle},right:70%" \
-			--bind "ctrl-o:execute(git checkout {} && git status)+abort"
+			--bind "ctrl-o:execute(git switch {})+abort"
 	;;
 
 git-tags)