From 3a5b050993b9491f4832489f864a7810e5f3d37f Mon Sep 17 00:00:00 2001 From: Charles Gould Date: Sat, 16 Jan 2021 01:02:53 -0500 Subject: [PATCH] git: logsearch date to left column --- fish/conf.d/fzf.fish | 4 ++-- git/config | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fish/conf.d/fzf.fish b/fish/conf.d/fzf.fish index cabfe5c..b02bea9 100644 --- a/fish/conf.d/fzf.fish +++ b/fish/conf.d/fzf.fish @@ -25,9 +25,9 @@ function __fzf_git_log else set -l output ( command git logsearch | - fzf --ansi --tiebreak=index --preview='git show --color {1}' --preview-window='right:70%:hidden:wrap' --bind='?:toggle-preview' --header='? to preview' + fzf --ansi --tiebreak=index --preview='git show --color {2}' --preview-window='right:70%:hidden:wrap' --bind='?:toggle-preview' --header='? to preview' ) - if set -l commit_hash (string split --max 1 " " $output)[1] + if set -l commit_hash (string split --max 2 " " $output)[2] commandline -i $commit_hash end end diff --git a/git/config b/git/config index 35c7a9c..f633b1a 100644 --- a/git/config +++ b/git/config @@ -9,7 +9,7 @@ branchsort = branch --sort='-committerdate' --format='%(HEAD) %(color:blue)%(committerdate:short)%(color:reset) %(if)%(worktreepath)%(then)%(color:reverse yellow)%(refname:short)%(color:reset)%(else)%(color:yellow)%(refname:short)%(color:reset)%(end) %(color:green)%(upstream:short)%(color:reset)' can = commit --amend --no-edit cand = commit --amend --no-edit --date=now - logsearch = log --color=always --format=tformat:'%C(yellow)%h%C(reset) %C(blue)%cs%C(reset) %C(normal)%s%C(reset)' + logsearch = log --color=always --format=tformat:'%C(blue)%cs%C(reset) %C(yellow)%h%C(reset) %C(normal)%s%C(reset)' rbi = rebase --interactive wipe = restore --staged --worktree [color]