From 5539baa3402946e85b68f3fc55f2ad857389bdaa Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 16 Nov 2024 19:01:27 +0100 Subject: [PATCH] gd,gdc,gdcw,gdt,gdw --- shell/alias/git.sh | 55 +++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/shell/alias/git.sh b/shell/alias/git.sh index 5ce5859..a93bcb5 100644 --- a/shell/alias/git.sh +++ b/shell/alias/git.sh @@ -169,39 +169,44 @@ gcun() { } # differences from last or between commits -alias gd="\ -git \ -diff \ -" +gd() { + git \ + diff \ + "${@}" +} # display what is indexed in cache -alias gdc="\ -git \ -diff \ ---cached \ -" +gdc() { + git \ + diff \ + --cached \ + "${@}" +} # indexed character-level differences -alias gdcw="\ -git \ -diff \ ---cached \ ---word-diff-regex=. \ -" +gdcw() { + git \ + diff \ + --cached \ + --word-diff-regex "." \ + "${@}" +} # differences via external tool -alias gdt="\ -git \ -difftool \ ---dir-diff \ -" +gdt() { + git \ + difftool \ + --dir-diff \ + "${@}" +} # character-level differences -alias gdw="\ -git \ -diff \ ---word-diff-regex=. \ -" +gdw() { + git \ + diff \ + --word-diff-regex "." \ + "${@}" +} # fetch from the remote repository alias gf="\