From 49c1bdaa8e0f3481f0e89feebe80d113d66b46d0 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 7 Jul 2016 18:26:52 +0300 Subject: [PATCH] .shellrc: add function cdremote Change current directory to a remote's directory (if the remote is on the local FS). --- .shellrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.shellrc b/.shellrc index 860ba44..1ac77cf 100644 --- a/.shellrc +++ b/.shellrc @@ -164,6 +164,14 @@ KillAll() { } +# git-related + +# chdir to a remote's directory (if the remote is on the local FS) +cdremote() { + cd "`git config --get remote.$1.url`" +} + + include() { cfg="$1" -- 2.39.2