From 20fabff976e98cb607881bb963cf35e1ee1c94ff Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Fri, 15 May 2020 09:59:40 +0200 Subject: [PATCH] Add gcd command to CD within git trees --- bashrc | 1 + bin/git-cd | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 bin/git-cd diff --git a/bashrc b/bashrc index 63c7004..aa00ef5 100644 --- a/bashrc +++ b/bashrc @@ -1,4 +1,5 @@ # vim: set noexpandtab :miv # +alias gcd="source git-cd" alias hello='echo "Hello :)"' alias w='watch -t -d -n 1' alias setclip='xclip -selection c' diff --git a/bin/git-cd b/bin/git-cd new file mode 100644 index 0000000..5834947 --- /dev/null +++ b/bin/git-cd @@ -0,0 +1,3 @@ +#!/bin/sh + +cd "$(git rev-parse --show-toplevel)/"$@