In Linux there's no open command. You should be able to do this if your default browser is set
open
alias gh="$BROWSER $(git remote -v | grep git@github.com | grep fetch | head -1 | cut -f2 | cut -d' ' -f1 | sed -e's/:/\//' -e 's/git@/http:\/\//'\)"
It may work on osx as well if you set $BROWSER in your terminal somewhere. Note, I'm on my phone so I couldn't try this but it should be right
Oh wow! Thank you! I edited the article, specified environments and added your script there.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In Linux there's no
open
command. You should be able to do this if your default browser is setIt may work on osx as well if you set $BROWSER in your terminal somewhere. Note, I'm on my phone so I couldn't try this but it should be right
Oh wow! Thank you! I edited the article, specified environments and added your script there.