mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-21 19:11:30 +01:00
zsh: move git fuzzy log to gitconfig (usage: git flog
)
This commit is contained in:
parent
c329308759
commit
4d9462239f
|
@ -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 \
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue
Block a user