Created
April 27, 2023 13:47
-
-
Save bbelderbos/1bd40a146c5562adb82a6f9b7e441aa9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function openrepo { | |
url="$(git remote get-url origin)" | |
open "https://github.com/$(echo "$url" | sed 's,.*github.com[:/],,')" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This also works nicely, relying on the sed not matching an https remote: