mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-14 03:42:56 +00:00
13 lines
431 B
Fish
13 lines
431 B
Fish
function git-fuzzy-branch -a header
|
|
set -l current (git rev-parse --abbrev-ref HEAD | tr -d '\n')
|
|
set -l branch (git branch \
|
|
--format "%(refname:short)" \
|
|
| fzf \
|
|
--height 50% \
|
|
--header="On $current, $header" \
|
|
--preview-window right:70% \
|
|
--preview 'git log {} --color=always --pretty="format:%C(auto)%ar %h%d %s"' \
|
|
)
|
|
and echo $branch
|
|
end
|