Hopefully fixed git function to handle files with spaces
authorAndrew DeFaria <Andrew@DeFaria.com>
Thu, 28 Mar 2019 18:22:00 +0000 (11:22 -0700)
committerAndrew DeFaria <Andrew@DeFaria.com>
Thu, 28 Mar 2019 18:22:00 +0000 (11:22 -0700)
rc/git

diff --git a/rc/git b/rc/git
index 341ca7b..7e235fe 100644 (file)
--- a/rc/git
+++ b/rc/git
@@ -34,7 +34,7 @@ function git () {
 
   if [ "${git:0:3}" != "no " ]; then
     if [ "$1" = "checkout" -o "$1" = "co" ]; then
-      $git $@
+      $git "$@"
       set_title
     elif [ "$1" = "files" ]; then
       if [ -z "$2" ]; then
@@ -45,7 +45,7 @@ function git () {
        $git show --pretty="" --name-only $2
       fi
     else
-      $git $@
+      $git "$@"
     fi
   fi
 } # git