fish: functions: Make it easier to review code with difftool aliases
If no arguments are provided to the git difftool aliases, just invoke it with the default `git difftool main...current-branch`. This is what we will use most of the time anyway as this is exactly the command needed when we want to review our own changes before pushing upstream or reviewing some other merge request.
This commit is contained in:
parent
7b6cd2575c
commit
2ab2c2255b
3 changed files with 21 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
function gdd --description "Use difftastic as a difftool"
|
||||
if count $argv >/dev/null
|
||||
git difftool --tool=difftastic $argv
|
||||
else
|
||||
set default (git symbolic-ref refs/remotes/origin/HEAD | awk -F'/' '{print $4}')
|
||||
set current (git branch --show-current)
|
||||
git difftool --tool=difftastic $default...$current
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
function gdk
|
||||
if count $argv >/dev/null
|
||||
git difftool --tool=kitty $argv
|
||||
else
|
||||
set default (git symbolic-ref refs/remotes/origin/HEAD | awk -F'/' '{print $4}')
|
||||
set current (git branch --show-current)
|
||||
git difftool --tool=kitty $default...$current
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue