Pārlūkot izejas kodu

Create a function to cd to a git repo root

DricomDragon 5 gadi atpakaļ
vecāks
revīzija
cb02b3c5b2
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5 0
      Install/Templates/fish/functions/cdg.fish

+ 5 - 0
Install/Templates/fish/functions/cdg.fish

@@ -0,0 +1,5 @@
+function cdg --description 'Go to root folder of the current Git repository'
+    if set -l GIT_ROOT (git rev-parse --show-toplevel)
+		cd $GIT_ROOT
+	end
+end