# HG changeset patch # User Peter Sanchez # Date 1705498291 21600 # Wed Jan 17 07:31:31 2024 -0600 # Node ID 6933c8e40776f890fd43b523b32c7acb6622eeb1 # Parent 1ead1bc70e609b5a7943786a39c0c08eb550c083 Adding gitb shell helper function diff --git a/.profile b/.profile --- a/.profile +++ b/.profile @@ -4,6 +4,12 @@ [[ -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