diff options
author | Martin Polden <mpolden@mpolden.no> | 2023-02-16 18:40:36 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2023-02-16 18:40:36 +0100 |
commit | fe4b7c0c69c1b76e146d8170a4b7563d4e50618c (patch) | |
tree | 036814c2463e4350e1dcef018b3b3e5a5b568fab | |
parent | 5595f4dda16bf4f0a43c09860857684f5445e555 (diff) |
git: preview commit via fzf
-rw-r--r-- | gitconfig | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -26,8 +26,7 @@ ui = auto [alias] lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" - lg-fzf = "!git lg --color=always | fzf --ansi --multi --reverse --delimiter=' - ' --nth=2.. | perl -lne '/ ([a-f0-9]+) - / && print $1'" - show-fzf="!git lg-fzf | xargs -r git show" + fzf = "!git lg --color=always | fzf --ansi --multi --reverse --delimiter=' - ' --nth=2.. --preview='echo {} | grep -Eo \"[a-f0-9]{7,}\" | xargs -r git show --color=always' | grep -Eo '[a-f0-9]{7,}'" s = status --short --branch co = checkout b = branch |