Adding gitb shell helper function
1 files changed, 6 insertions(+), 0 deletions(-)

M .profile
M .profile +6 -0
@@ 4,6 4,12 @@ bitb() {
     [[ -n $URL ]] && xdg-open $URL || echo "No hg.code.netlandish.com path found!"
 }
 
+gitb() {
+    local P="$(git remote -v | grep 'git.code.netlandish.com'| head -n1)"
+    local URL="$(echo $P | awk '{print $2}' | cut -d@ -f2 | sed -e's|.*\(git.code.netlandish.com\):\(.*\)|https://\1/\2|')"
+    [[ -n $URL ]] && xdg-open $URL || echo "No hg.code.netlandish.com path found!"
+}
+
 # Default for FB script if not present
 # https://bitbucket.org/facebook/hg-experimental/
 # https://bitbucket.org/petersanchez/hg-experimental/src/default/scripts/scm-prompt.sh