henrikruscon / hyper-statusline

Status Line Plugin for Hyper
MIT License
387 stars 79 forks source link

Git branch label now links to remote URL. #2

Closed s2tephen closed 7 years ago

s2tephen commented 7 years ago

Since clicking the CWD label opens it in the file browser, I wanted an analogous behavior for the Git branch label (i.e. clicking it opens the repo in the web browser). Not sure if you want this as a feature, but since I implemented it for myself I figured I'd submit a PR.

Thanks for making the plugin!

henrikruscon commented 7 years ago

Neat feature. I've been wanting to expand the git part but been lacking time, so this is a welcome addition! 👊

However, it currently triggers the phishing alert for me in both Safari and Firefox. Chrome works fine. Solution would be to strip the username from the URL as well.

SED is not supported by Windows so it might be better to handle the stripping with JS instead?

Thanks for contributing to it! ✌️

s2tephen commented 7 years ago

Good points, I'll make some edits. I'm not quite sure what you mean by "strip the username" — what kinds of URLs are you getting the phishing alerts on?

henrikruscon commented 7 years ago

Merged and swapped SED for JS in latest commit.

If I clone from GitHub my remotes becomes for example https://henrikdahl@github.com/henrikdahl/hyperterm-chesterish

henrikdahl@ is what's causing the phishing alert.