dotfiles/fish.configlink/functions/git-commits.fish

11 lines
311 B
Fish
Raw Permalink Normal View History

function git-commits
set commitline (git log \
--pretty="format:%C(auto)%ar %h%d %s" \
| fzf \
--height 50% \
--preview 'git show --color=always (echo {} | cut -d" " -f4)' \
)
and set commit (echo $commitline | cut -d" " -f4)
and echo $commit
end