gerep / git-open

Open your github project page from your terminal
53 stars 13 forks source link

Port from bash to sh. Possible edge cases not tested with this script. #10

Closed lahemi closed 9 years ago

lahemi commented 9 years ago

You (or someone) linked this git-open thing to #go-nuts @freenode and I mentioned about using sh instead of bash, and then this happened. The ported script worked in basic cases for me, but do test it to see if does what it is supposed to do.

gerep commented 9 years ago

Hey @lahemi thanks for you PR.

This code doesn't work if I pass a parameter like : git open next I guess this happens because you added the main() where it checks for the $1

if [ $# -gt 0 ]; then branch=$1

The $1 is checking for the first parameter of the main() function.

Can you fix that?

lahemi commented 9 years ago

Sure, just needed to add "$@" after main, forgot to do that in the version I pushed, sorry.