zsh: move git fuzzy log to gitconfig (usage: `git flog`)

fix-ci
bretello 2023-10-25 11:43:16 +02:00
parent c329308759
commit 4d9462239f
2 changed files with 1 additions and 6 deletions

View File

@ -37,12 +37,6 @@ function git-switch-recent-branch(){
# compdef git-sort-branch-by-usage git-switch-recent-branch
compdef "__git_completion_wrapper __git_recent_branches" git-switch-recent-branch
# Runs git log with fzf with preview
function fgitlog() {
git showtool $(git log --oneline $@ | fzf --multi --preview 'git -p show --color=always {+1}' --preview-window=right,60% | awk '{print $1}')
}
compdef _git fgitlog=git-log
function git-commit-show() {
git log --graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" $@ |
fzf --ansi --no-sort --reverse --tiebreak=index --preview \

View File

@ -35,3 +35,4 @@ abbrevcommit = true
[alias]
showtool = "!showci () { rev=${1:-HEAD}; git difftool $rev~1 $rev; }; showci $1"
mylog = "log --pretty='format:👉 %C(yellow)commit: %h%C(auto)%d %Creset%nAuthor: %C(auto,cyan)%>(12)%an (%aE)%n%C(reset)Date: %C(auto,green)%ar%Creset%nContent: %s'"
flog = "!flog() { git log --oneline $@ | fzf --multi --preview 'git -p show --color=always {+1}' --preview-window=right,60% | awk '{print $1}'; }; flog"