Merge pull request #854 from bethesque/fix/git-browse-sed-on-mac

fix(browse): update sed pattern to work on mac
This commit is contained in:
罗泽轩 2020-06-23 10:08:03 +08:00 committed by GitHub
commit a0a32abc0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,7 +22,7 @@ fi
if [[ $remote_url = git@* ]]
then
url=$(echo $remote_url | sed -E -e 's/:/\//' -e 's/\.git$//' -e 's/\w*@(.*)/http:\/\/\1/')
url=$(echo $remote_url | sed -E -e 's/:/\//' -e 's/\.git$//' -e 's/.*@(.*)/http:\/\/\1/')
elif [[ $remote_url = http* ]]
then
url=${remote_url%.git}