dotfiles/fish/.config/fish/functions/gdt.fish

10 lines
291 B
Fish

function gdt
if count $argv >/dev/null
git --no-pager difftool $argv
else
set default (git symbolic-ref refs/remotes/origin/HEAD | awk -F'/' '{print $4}')
set current (git branch --show-current)
git --no-pager difftool $default...$current
end
end